From: Julian Smart Date: Sun, 13 Jul 2008 12:13:38 +0000 (+0000) Subject: Shift+Return now puts the cursor on the next line X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/043c0d5843099d873017d87cb3c23520cc65cc31 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 --- diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 0135fa961f..51506a79d3 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -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(); diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index c4a91f1528..d55b6a9bcc 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -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);