Unverified Commit 48c1d7f1 authored by Miezhiko's avatar Miezhiko
Browse files

Make shift+enter to newline on all chat windows + handling fix


Signed-off-by: Miezhiko's avatarMiezhiko <Miezhiko@gmail.com>
parent 33d57a4b
......@@ -1784,6 +1784,18 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
autoIndent();
}
}
else if (mask == MASK_SHIFT)
{
if( mCursorPos > 0 )
{
const LLWString& text = getWText();
if( '\n' != text[ mCursorPos - 1 ] )
{
addLineBreakChar();
handled = TRUE;
}
}
}
else
{
handled = FALSE;
......
......@@ -213,7 +213,6 @@ class LLTextEditor :
bool getShowContextMenu() const { return mShowContextMenu; }
void setPassDelete(BOOL b) { mPassDelete = b; }
void handleNewLine() { addLineBreakChar(FALSE); }
protected:
void showContextMenu(S32 x, S32 y);
......
......@@ -426,20 +426,6 @@ BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask )
sendChat(CHAT_TYPE_SHOUT);
handled = TRUE;
}
else if (KEY_RETURN == key && mask == MASK_SHIFT)
{
// newline
if (mInputEditor)
{
// but don't allow multiple new lines
LLWString raw_text = mInputEditor->getWText();
if (raw_text[raw_text.length() - 1] != '\n')
{
mInputEditor->handleNewLine();
}
}
handled = TRUE;
}
if((mask == MASK_ALT) && isTornOff())
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment