zsh-autosuggestions/spec
Eric Freese 676aebdf44 Fix deleting last character in vi mode (#302)
Typing `d` and then `l` runs `vi-delete` and then `vi-forward-char`.  However,
by default, `vi-forward-char` is configured to accept the suggestion. So in
that case, the suggestion was being accepted and the cursor set to the end of
the buffer before the deletion was run.

The reason the user doesn't see the suggestion accepted is that `vi-delete`
doesn't finish until the movement widget is run, so we're already inside of a
`modify` when `accept` is called. `modify` unsets `POSTDISPLAY` before calling
the original widget so when we get to the accept function, `POSTDISPLAY` is
empty and thus accepting the suggestion is a no-op.

The fix is to make sure we reset the cursor to the correct place before running
the original widget.

We skip the test for versions of zsh below 5.0.8 since there was a bug in
earlier versions where deleting the last char did not work.

See http://www.zsh.org/mla/workers/2014/msg01316.html
2019-06-22 16:34:42 -06:00
..
integrations Fix deleting last character in vi mode (#302) 2019-06-22 16:34:42 -06:00
options Allow disabling of automatic widget re-binding 2019-04-10 11:43:21 -06:00
strategies Prefix custom _complete implementation with "function" keyword 2019-06-17 22:04:31 -06:00
widgets Enabling suggestions should not fetch a suggestion if buffer is empty 2017-03-05 12:53:13 -05:00
async_spec.rb Don't fetch suggestions after copy-earlier-word 2019-06-14 13:19:07 -06:00
kill_ring_spec.rb Don't break kill ring rotation 2018-05-15 12:54:09 -06:00
line_init_spec.rb Remove hard-coded ignore of zle-* widgets and add to default config 2019-06-14 16:38:28 -06:00
multi_line_spec.rb Lots of async changes 2017-02-16 19:19:30 -07:00
spec_helper.rb Set options immediately after sourcing the plugin before next precmd 2019-04-15 12:46:21 -06:00
terminal_session.rb Revert async process substitution & completion strategy 2018-12-16 20:49:06 -07:00