Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Fri, 13 Oct 2023 20:27:47 UTC Commit: 9ad218bcdd6f57550bbcc2932c01bc71d89f2316 https://github.com/geany/geany-plugins/commit/9ad218bcdd6f57550bbcc2932c01bc...
Log Message: ----------- git-changebar: Re-set first visible line after Scintilla size request
After updating to Scintilla 5.3.7 the Scintilla popup with the diff against git shows the wrong number.
It seems that gtk_widget_set_size_request() scrolls Scintilla view so despite it was set previously, it isn't set correctly after this call and has to be re-set.
Note that the call to SCI_SETFIRSTVISIBLELINE has to stay at the original location too, otherwise subsequent calculation using SCI_POINTXFROMPOSITION doesn't work because the line may not be visible.
Modified Paths: -------------- git-changebar/src/gcb-plugin.c
Modified: git-changebar/src/gcb-plugin.c 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -878,6 +878,9 @@ get_widget_for_buf_range (GeanyDocument *doc, MIN (width + 2, alloc.width), MIN (height + 1, alloc.height));
+ /* Size request seems to scroll Scintilla view so we have to re-set visible lines again */ + scintilla_send_message (sci, SCI_SETFIRSTVISIBLELINE, line_start, 0); + return GTK_WIDGET (sci); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org