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:
@@ -4171,7 +4171,9 @@ bool wxRichTextParagraph::GetContiguousPlainText(wxString& text, const wxRichTex
|
|||||||
text += textObj->GetTextForRange(range);
|
text += textObj->GetTextForRange(range);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
{
|
||||||
|
text += wxT(" ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
@@ -4191,7 +4193,9 @@ bool wxRichTextParagraph::GetContiguousPlainText(wxString& text, const wxRichTex
|
|||||||
text = textObj->GetTextForRange(range) + text;
|
text = textObj->GetTextForRange(range) + text;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
{
|
||||||
|
text = wxT(" ") + text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node = node->GetPrevious();
|
node = node->GetPrevious();
|
||||||
|
@@ -697,6 +697,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
wxString text;
|
wxString text;
|
||||||
text = wxRichTextLineBreakChar;
|
text = wxRichTextLineBreakChar;
|
||||||
GetBuffer().InsertTextWithUndo(newPos+1, text, this);
|
GetBuffer().InsertTextWithUndo(newPos+1, text, this);
|
||||||
|
m_caretAtLineStart = true;
|
||||||
|
PositionCaret();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
GetBuffer().InsertNewlineWithUndo(newPos+1, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE|wxRICHTEXT_INSERT_INTERACTIVE);
|
GetBuffer().InsertNewlineWithUndo(newPos+1, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE|wxRICHTEXT_INSERT_INTERACTIVE);
|
||||||
|
Reference in New Issue
Block a user