From a07db0b055b4289e6480b9f45072858c97d4969a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 16 Nov 2012 23:44:10 +0100 Subject: scroll caret into view after text insertion --- parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parser.cpp') diff --git a/parser.cpp b/parser.cpp index 7e4da4a..ea3a9a9 100644 --- a/parser.cpp +++ b/parser.cpp @@ -1108,6 +1108,7 @@ StateInsert::initial(void) throw (Error) } for (int i = args; i > 0; i--) expressions.pop_num_calc(); + interface.ssm(SCI_SCROLLCARET); interface.ssm(SCI_ENDUNDOACTION); undo.push_msg(SCI_UNDO); @@ -1118,7 +1119,8 @@ StateInsert::process(const gchar *str, gint new_chars) throw (Error) { interface.ssm(SCI_BEGINUNDOACTION); interface.ssm(SCI_ADDTEXT, new_chars, - (sptr_t)(str + strlen(str) - new_chars)); + (sptr_t)(str + strlen(str) - new_chars)); + interface.ssm(SCI_SCROLLCARET); interface.ssm(SCI_ENDUNDOACTION); undo.push_msg(SCI_UNDO); -- cgit v1.2.3