zsh-autosuggestions/spec/integrations
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
..
auto_cd_spec.rb Respect user's set options when running original widget 2018-12-16 21:13:02 -07:00
bracketed_paste_magic_spec.rb Add spec to demonstrate bracketed-paste-magic bug workaround 2019-04-15 12:47:21 -06:00
client_zpty_spec.rb Implement completion suggestion strategy (#111) 2019-04-11 09:53:55 -06:00
glob_subst_spec.rb Respect user's set options when running original widget 2018-12-16 21:13:02 -07:00
rebound_bracket_spec.rb Fix conditionals to use [[ and (( rather than [ 2017-11-27 08:31:41 -07:00
vi_mode_spec.rb Fix deleting last character in vi mode (#302) 2019-06-22 16:34:42 -06:00
wrapped_widget_spec.rb Fix issues with widgets wrapped by other plugins 2017-03-03 18:43:10 -05:00
zle_input_stack_spec.rb Support fallback strategies by setting array in config 2018-06-06 22:03:56 -06:00