Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions zsh-vi-mode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ function zvm_vi_put_after() {
local count=${NUMERIC:-1}
local head= foot=
local content=${CUTBUFFER}
local offset=1

if [[ ${content: -1} == $'\n' ]]; then
local pos=${CURSOR}
Expand Down Expand Up @@ -1183,7 +1182,6 @@ function zvm_vi_put_after() {
repeated+="$content"
done

offset=0
BUFFER="${head}${repeated}${foot}"
CURSOR=$pos
else
Expand All @@ -1207,9 +1205,8 @@ function zvm_vi_put_after() {
CURSOR=$CURSOR+$#repeated
fi

# Refresh display and highlight buffer
# Refresh display
zvm_highlight clear
zvm_highlight custom $(($#head+$offset)) $(($#head+$#repeated+$offset))
}

# Put cutbuffer before the cursor
Expand Down Expand Up @@ -1260,9 +1257,8 @@ function zvm_vi_put_before() {
CURSOR=$((CURSOR-1))
fi

# Refresh display and highlight buffer
# Refresh display
zvm_highlight clear
zvm_highlight custom $#head $(($#head+$#repeated))
}

# Replace a selection
Expand Down