Skip to content

Commit c806055

Browse files
authored
Merge pull request #451 from zsh-users/develop
v0.6.2
2 parents ec43fcf + cb52adf commit c806055

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.6.2
4+
- Fixed bug deleting the last character in the buffer in vi mode (#450)
5+
- Degrade gracefully when user doesn't have `zsh/system` module installed (#447)
6+
37
## v0.6.1
48
- Fixed bug occurring when `_complete` had been aliased (#443)
59

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
_[Fish](http://fishshell.com/)-like fast/unobtrusive autosuggestions for zsh._
44

5-
It suggests commands as you type.
5+
It suggests commands as you type based on history and completions.
66

77
Requirements: Zsh v4.3.11 or later
88

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.6.1
1+
v0.6.2

spec/integrations/vi_mode_spec.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,18 @@
6363
end
6464
end
6565
end
66-
end
6766

67+
describe '`vi-delete`' do
68+
it 'should be able to remove the last character in the buffer' do
69+
skip 'deleting last char did not work below zsh version 5.0.8' if session.zsh_version < Gem::Version.new('5.0.8')
70+
71+
session.
72+
send_string('echo foo').
73+
send_keys('escape').
74+
send_keys('d').
75+
send_keys('l')
76+
77+
wait_for { session.content }.to eq('echo fo')
78+
end
79+
end
80+
end

src/widgets.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ _zsh_autosuggest_accept() {
136136
unset POSTDISPLAY
137137

138138
# Move the cursor to the end of the buffer
139-
CURSOR=${#BUFFER}
139+
CURSOR=${max_cursor_pos}
140140
fi
141141

142142
_zsh_autosuggest_invoke_original_widget $@

zsh-autosuggestions.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fish-like fast/unobtrusive autosuggestions for zsh.
22
# https://github.com/zsh-users/zsh-autosuggestions
3-
# v0.6.1
3+
# v0.6.2
44
# Copyright (c) 2013 Thiago de Arruda
55
# Copyright (c) 2016-2019 Eric Freese
66
#
@@ -398,7 +398,7 @@ _zsh_autosuggest_accept() {
398398
unset POSTDISPLAY
399399

400400
# Move the cursor to the end of the buffer
401-
CURSOR=${#BUFFER}
401+
CURSOR=${max_cursor_pos}
402402
fi
403403

404404
_zsh_autosuggest_invoke_original_widget $@

0 commit comments

Comments
 (0)