On Thu, 3 Dec 2020, Sven Schreiber wrote:
Hi, the following behavior has annoyed me for a long time already,
but
it was kind of hard to describe. Now let me try with a very complete and
small example.
Open the script editor with a new (empty) script. In the preferences
have all editor options activated (=ticked), including auto-complete.
Type the first line:
series a <return>
OK, go on to type:
series damn
For me with this fairly recent Windows version after typing the first
two letters "da" I get a pop-up suggesting me the word "series".
Since
that's not what I want I ignore it. Fine - but then after finishing the
word "damn" I hit <return> to get a line break. However, the editor
thinks I want to accept its suggestion and replaces "damn" with
"series", so what I get is:
series series
(and no line break)
This is a quite distracting PITA. Is this a GTK problem? An obvious
workaround is to switch off auto-completion, or get used to typing a
superfluous space at the end before the return.
This "service" is provided by gtksourceview. It seems to work
not too badly with gtksourceview-3.0 (companion of GtK 3) but on
Linux using Gtk 2 + gtksourceview-2.0 I can replicate the broken
behaviour you describe. (Regardless of further problems, it's
already broken to offer "series" as a completion of "da".)
I suppose we need to either backport a fix from gtksourceview-3.0,
if possible, or remove the autocompletion option for gretl builds
that use Gtk 2.
I can't say I find this facility very useful even in Gtk 3: it has
no notion of hansl context and just works with a flat list of
previously typed words.
Allin