]> git.saurik.com Git - wxWidgets.git/commitdiff
Shift+Return now puts the cursor on the next line
authorJulian Smart <julian@anthemion.co.uk>
Sun, 13 Jul 2008 12:13:38 +0000 (12:13 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 13 Jul 2008 12:13:38 +0000 (12:13 +0000)
Fixed GetContiguousPlainText bug that caused wrapping problem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp
src/richtext/richtextctrl.cpp

index 0135fa961f0fe24953bb16c7881f5343a2139b7d..51506a79d39344b2ddc50f390e15d64334c120c5 100644 (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();
index c4a91f15287235cf21f8129692f75de5e832aac0..d55b6a9bcc59c14b0a70ae44802b588067e58ee4 100644 (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);