From bf104bf71bbdb913072f93ac7cd6ab0cabfeb669 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 20 Apr 2008 19:08:19 +0000 Subject: [PATCH] Fix for slow first character insertion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 7d61b5e8a6..06ba477452 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -6291,7 +6291,7 @@ bool wxRichTextAction::Do() m_buffer->InsertFragment(GetRange().GetStart(), m_newParagraphs); m_buffer->UpdateRanges(); - m_buffer->Invalidate(wxRichTextRange(GetRange().GetStart()-1, GetRange().GetEnd())); + m_buffer->Invalidate(wxRichTextRange(wxMax(0, GetRange().GetStart()-1), GetRange().GetEnd())); long newCaretPosition = GetPosition() + m_newParagraphs.GetRange().GetLength(); -- 2.45.2