diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 37a28ac721306b6148c4761bc5e12653c53fa6af..d3497c1c23abf094b7a848b0267b3cab99c68022 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -562,7 +562,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
 		drawn_x = cur_x;
 	}
 
-	if( clip && end_on_word_boundary && (start_of_last_word != 0) )
+	if( clip && end_on_word_boundary )
 	{
 		i = start_of_last_word;
 	}
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index fa0abd55d027efe080de8eb9ae26e717346c92af..7248581ec66bf85bdd849c3d4e0a1e4fd6f5b6a9 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -331,6 +331,11 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, b
 		}
 
 		U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE);
+		if (drawable == 0)
+		{
+			// try again without wrapping on word boundaries
+			drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, FALSE);
+		}
 
 		if (drawable != 0)
 		{
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 2648cbf08dbcd455955c63612de8523fc7781298..527c0a1b87509fa6c9055ea864b6a7f21c541634 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1143,37 +1143,41 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
 	if (!branch)
 		return LLMenuItemGL::handleKeyHere(key, mask);
 
-	if (getMenu()->getVisible() && branch->getVisible() && key == KEY_LEFT)
+	// an item is highlighted, my menu is open, and I have an active sub menu or we are in
+	// keyboard navigation mode
+	if (getHighlight() 
+		&& getMenu()->isOpen() 
+		&& (isActive() || LLMenuGL::getKeyboardMode()))
 	{
-		// switch to keyboard navigation mode
-		LLMenuGL::setKeyboardMode(TRUE);
-
-		BOOL handled = branch->clearHoverItem();
-		if (branch->getTornOff())
+		if (branch->getVisible() && key == KEY_LEFT)
 		{
-			((LLFloater*)branch->getParent())->setFocus(FALSE);
-		}
-		if (handled && getMenu()->getTornOff())
-		{
-			((LLFloater*)getMenu()->getParent())->setFocus(TRUE);
-		}
-		return handled;
-	}
+			// switch to keyboard navigation mode
+			LLMenuGL::setKeyboardMode(TRUE);
 
-	if (getHighlight() && 
-		getMenu()->isOpen() && 
-		key == KEY_RIGHT && !branch->getHighlightedItem())
-	{
-		// switch to keyboard navigation mode
-		LLMenuGL::setKeyboardMode(TRUE);
+			BOOL handled = branch->clearHoverItem();
+			if (branch->getTornOff())
+			{
+				((LLFloater*)branch->getParent())->setFocus(FALSE);
+			}
+			if (handled && getMenu()->getTornOff())
+			{
+				((LLFloater*)getMenu()->getParent())->setFocus(TRUE);
+			}
+			return handled;
+		}
 
-		LLMenuItemGL* itemp = branch->highlightNextItem(NULL);
-		if (itemp)
+		if (key == KEY_RIGHT && !branch->getHighlightedItem())
 		{
-			return TRUE;
+			// switch to keyboard navigation mode
+			LLMenuGL::setKeyboardMode(TRUE);
+
+			LLMenuItemGL* itemp = branch->highlightNextItem(NULL);
+			if (itemp)
+			{
+				return TRUE;
+			}
 		}
 	}
-
 	return LLMenuItemGL::handleKeyHere(key, mask);
 }
 
@@ -1431,7 +1435,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 {
 	BOOL menu_open = getBranch()->getVisible();
 	// don't do keyboard navigation of top-level menus unless in keyboard mode, or menu expanded
-	if (getHighlight() && getMenu()->getVisible() && (isActive() || LLMenuGL::getKeyboardMode()))
+	if (getHighlight() && getMenu()->isOpen() && (isActive() || LLMenuGL::getKeyboardMode()))
 	{
 		if (key == KEY_LEFT)
 		{
@@ -2836,6 +2840,7 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
 	return TRUE;
 }
 
+
 void LLMenuGL::draw( void )
 {
 	if (mNeedsArrange)
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 21cadda6e3e657cd21f39bc31f08921d5edc798f..dac328057527d6c041a3f1ffd96c6f8b12f22689 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -593,6 +593,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
 		mEditor->appendText(message, FALSE, style_params);
 	}
 	mEditor->blockUndo();
+
+	// automatically scroll to end when receiving chat from myself
+	if (chat.mFromID == gAgentID)
+	{
+		mEditor->setCursorAndScrollToEnd();
+	}
 }
 
 void LLChatHistory::draw()
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 0b5da40be4d5fb74594b2b58457613ccf49a8b54..b95e5f53e8f3e2a9c7a766ccae0271a43a6163df 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -607,6 +607,11 @@ void LLHUDText::addLine(const LLWString &wstr, const LLColor4& color, const LLFo
 			do	
 			{
 				S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), TRUE);
+				if (segment_length == 0)
+				{
+					// try again without wrapping on word boundaries
+					segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), FALSE);
+				}
 				mTextSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), style, color));
 				line_length += segment_length;
 			}
@@ -643,6 +648,11 @@ void LLHUDText::setLabel(const LLWString &wlabel)
 			do	
 			{
 				S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), TRUE);
+				if (segment_length == 0)
+				{
+					// try again without wrapping on word boundaries
+					segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), FALSE);
+				}
 				mLabelSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), LLFontGL::NORMAL, mColor));
 				line_length += segment_length;
 			}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 14002531769e90ae3732be744ea5fe7e5c5528c2..83cbc8a1f919ab11ba4b73f8128e0126edbe4985 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1897,7 +1897,7 @@ void LLViewerWindow::draw()
 
 	if (!gSavedSettings.getBOOL("RenderUIBuffer"))
 	{
-		LLUI::sDirtyRect = this->getWindowRectRaw();
+		LLUI::sDirtyRect = getWindowRectScaled();
 	}
 
 	// HACK for timecode debugging