Regression test 0-nothing-selected-on-prompt-initial-shift-tab expects the last of its command's completion candidate to be selected after hitting s-tab twice in prompt mode.
src directory:$ ./kak -n -e 'source ../test/regression/0-nothing-selected-on-prompt-initial-shift-tab/rc; exec :my-command<space><s-tab>'
No completion candidates are highlighted.
Suggestion ccc is highlighted.
At runtime, typing out : my-command space s-tab results in ccc being highlighted, as expected - but not in exec.
The 0-nothing-selected-on-prompt-initial-shift-tab seems to rely on this bug to run - unless there's an explanation why the first hit on s-tab is being ignored?
Note that using tab instead doesn't highlight anything either.
This test is failing on Fedora Rawhide for some reason. Not happening on any other Fedora version.
First failed build:
https://copr.fedorainfracloud.org/coprs/jkonecny/kakoune/build/1223739/
Here is the list of builds:
https://copr.fedorainfracloud.org/coprs/jkonecny/kakoune/builds/
This is still happening also for a new Fedora 32, which is in beta freeze right now. It should be released on Tue 2020-04-28. It would be great to fix this before release.
Downstream bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1799560
kakoune package will be removed from Fedora if this won't be solved.
I'm not sure if this is the problem, but I have just discovered that if I press <ret> while a very slow completion script is running, with -menu, Kakoune waits for the completion script, but does not select the only entry. This means there could be a race between handling the keyboard and completion results.
completion triggers on idle, which does not happen in :exec as we dont have any delay between keystrokes. This is why the test does two <s-tab>, the first one triggers the completion engine manually, the second one selects the previous result.
This seems to be due to a compiler bug in gcc-10, reported it at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94041
Great work @mawww. Thanks a lot for finding this.
@jkonecny12 looks like the bug was fixed.
Yep this seems to be fixed. Only waiting until it gets to Fedora 32 then everything will be OK.
Thanks a lot for your help guys, you're the best!
Most helpful comment
This seems to be due to a compiler bug in gcc-10, reported it at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94041