On Wed, 14 Jul 2021, Sven Schreiber wrote:
Am 14.07.2021 um 14:00 schrieb Allin Cottrell:
> On Wed, 14 Jul 2021, Sven Schreiber wrote:
>
>> Hi,
>> I think it's a recent phenomenon (in Windows snapshots) that at the end
>> of a line hitting tab doesn't have an effect. I suspect that's due to
>> changes in the autocompletion setup. My setting is "automatic" (not
"on
>> demand via tab"), but apparently this isn't working 100% correctly.
>
> Yes, it's an effect of the autocompletion setup.
>
> When is tab wanted at the end of a line of hansl?
>
Well, it's not going to stay the end of the line of course...
Either to align the "=" signs of several lines, or I like to have a tab
before starting a comment.
We're talking about the case where the selected auto-completion mode
is via the tab key (as opposed to "always prompt if anything is
available" or "don't prompt at all").
In this mode if there are non-space characters immediately to the
left of the insertion point, then tab will be sent to gtksourceview
for potential auto-completion (and if any completions are offered, a
second tab keystroke will select the first completion).
However, if you type a single space at the end of a line, then you
can type a tab and have it actually come out as a tab (in current
git/snapshots): gretl knows that no auto-completion can be
forthcoming so we don't send the tab to gtksourceview.
In principle we could check if any completions would be offered --
in the general case, not reliant on a preceding space byte -- and if
not, pass the tab keystroke to the regular text entry apparatus, but
so far as I can tell gtksourceview doesn't have a means of
signalling to the caller function whether or not completions are
available: the user can see that, but the calling code cannot.
Allin