Kakoune: Regression test `0-nothing-selected-on-prompt-initial-shift-tab` expects the wrong outcome

Created on 10 Feb 2020  路  9Comments  路  Source: mawww/kakoune

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.

Steps

  • run the following command from the src directory:
$ ./kak -n -e 'source ../test/regression/0-nothing-selected-on-prompt-initial-shift-tab/rc; exec :my-command<space><s-tab>'

Outcome

No completion candidates are highlighted.

Expected

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.

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

All 9 comments

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.

https://download.copr.fedorainfracloud.org/results/jkonecny/kakoune/fedora-32-x86_64/01279166-kakoune/builder-live.log.gz

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akkartik picture akkartik  路  3Comments

alexherbo2 picture alexherbo2  路  3Comments

MasterOfTheTiger picture MasterOfTheTiger  路  4Comments

hwmack picture hwmack  路  4Comments

notramo picture notramo  路  3Comments