Use a per-line cache to avoid re-computing the offset from the start of
the buffer each time. This dramatically speeds up multiple replacements
on large files.
X-Scintilla-Bug-ID: https://sourceforge.net/p/scintilla/bugs/1910/
On GTK2 and GTK3 < 3.3.6 there is no GtkAccessibleClass::widget_unset()
method, so we can't destroy our accessible object right away. So, to
avoid accessing a destroyed widget, we need to check whether the widget
still exists in the the ScintillaGTKAccessible destructor.
In other methods it's not necessary because the wrapping GObject class
makes sure not to forward other when the widget has been destroyed, but
we still have to destroy the C++ instance no matter what, so the check
has to be on this side.
Fixes#1410.
Work around incorrect keybinding handling with multiple layouts so
cut/copy/delete keybindings work via menuitem activation if we failed
to trigger the action ourselves.
Closes#1386.
Instead of having a handler on 2 separate objects, use :select and
:deselect on the same one. Those signals are appropriate, as the
documentation mentions that submenus are popped up on :select.
Mark the associated menu items sensitive when the menu is hidden, so
that GTK's accelerator handling can trigger them. This works around
incorrect handling in Geany's code of keybindings coming from multiple
layouts for cut/copy/delete actions.
Partial workaround for #998, #1286 and #1368.
Avoid crash when detaching the widget from the accessible object
without destroying that widget.
In such situations, the widget is still valid but we will have
destroyed the orphaned accessible object. Thus, we must make sure we
disconnected the signal handlers the late accessible had set up on the
widget, as they won't be implicitly disconnected by widget
finalization in this case.
Fixes#1385.
Fix signature of the snippets keybindings callback, properly blocking
further propagation of handled events thus avoiding possibly activating
another action (like a builtin Scintilla keybinding).
Fixes#1354.
Since the Scintilla C++ lexer started to fold on `()` [1], the code
looking up the current scope is confused whenever the function
signature spans multiple lines. Fix this by skipping fold levels that
correspond to parentheses.
Fixes#1279.
[1] https://sourceforge.net/p/scintilla/feature-requests/1138/
imported in 24f91981c057a7e212c09da66fb974c3ccc85bd6
We cannot compute the length in characters after the text has been
deleted, so we need to compute it in BEFOREDELETE. However, we need to
emit the signal once the buffer has actually changed, so we need to
cache the value in-between those events.