Shift+Return now puts the cursor on the next line

Fixed GetContiguousPlainText bug that caused wrapping problem


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2008-07-13 12:13:38 +00:00
parent e6f688797c
commit 043c0d5843
2 changed files with 8 additions and 2 deletions

View File

@ -4171,7 +4171,9 @@ bool wxRichTextParagraph::GetContiguousPlainText(wxString& text, const wxRichTex
text += textObj->GetTextForRange(range);
}
else
return true;
{
text += wxT(" ");
}
}
node = node->GetNext();
@ -4191,7 +4193,9 @@ bool wxRichTextParagraph::GetContiguousPlainText(wxString& text, const wxRichTex
text = textObj->GetTextForRange(range) + text;
}
else
return true;
{
text = wxT(" ") + text;
}
}
node = node->GetPrevious();

View File

@ -697,6 +697,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
wxString text;
text = wxRichTextLineBreakChar;
GetBuffer().InsertTextWithUndo(newPos+1, text, this);
m_caretAtLineStart = true;
PositionCaret();
}
else
GetBuffer().InsertNewlineWithUndo(newPos+1, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE|wxRICHTEXT_INSERT_INTERACTIVE);