Ignore scrolling events in on_update_ui().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5702 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2011-04-10 12:08:24 +00:00
parent 9cd027ac50
commit f34622e8ad
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-04-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/editor.c:
Ignore scrolling events in on_update_ui().
2011-04-08 Colomban Wendling <colomban(at)geany(dot)org>
* scintilla/lexers/LexCPP.cxx:

View File

@ -515,6 +515,11 @@ static void on_update_ui(GeanyEditor *editor, G_GNUC_UNUSED SCNotification *nt)
ScintillaObject *sci = editor->sci;
gint pos = sci_get_current_position(sci);
/* since Scintilla 2.24, SCN_UPDATEUI is also sent on scrolling though we don't need to handle
* this and so ignore every SCN_UPDATEUI events except for content and selection changes */
if (! (nt->updated & SC_UPDATE_CONTENT) && ! (nt->updated & SC_UPDATE_SELECTION))
return;
/* undo / redo menu update */
ui_update_popup_reundo_items(editor->document);