Skip to content

Add "Move Words" action

Gaël Bonithon requested to merge Tamaranch/mousepad:add-move-words into master

Related upstream issue: https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/190

In the same spirit as !96 (merged), and following 7a8d0b36, this MR overrides GtkSourceView::move-words by adding some modifications.

[First idea, aborted] In short, the base signal is applied to the smallest group of words containing the current selection, which is preserved during the operation. This allows in particular to avoid configurations that trigger bugs like https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/190. [/aborted]

The action is simply tested first in a virtual view, to ensure that GSV does not remove content, before letting it operate on the real view.

Edited by Gaël Bonithon

Merge request reports