From aaec0f764ac3aa5187a44849f28397c2f05d6b39 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Tue, 16 Jan 2007 16:36:28 +0000 Subject: [PATCH] Fixed SD2-1072. The caret position is validated when the TextAreaControl is entered. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2298 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Gui/TextAreaControl.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextAreaControl.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextAreaControl.cs index 06734e8a62..18624d42a8 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextAreaControl.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextAreaControl.cs @@ -442,5 +442,13 @@ namespace ICSharpCode.TextEditor } base.WndProc(ref m); } + + protected override void OnEnter(EventArgs e) + { + // SD2-1072 - Make sure the caret line is valid if anyone + // has handlers for the Enter event. + Caret.ValidateCaretPos(); + base.OnEnter(e); + } } }