Skip to content

Commit

Permalink
Fix buffer restoration (mfaerevaag#127)
Browse files Browse the repository at this point in the history
Don't overwrite with empty buffer
  • Loading branch information
p1r473 authored Jun 13, 2024
1 parent 1975393 commit 498695f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,10 @@ wd_browse_widget() {
}

wd_restore_buffer() {
BUFFER=$saved_buffer
CURSOR=$saved_cursor
if [[ -n $saved_buffer ]]; then
BUFFER=$saved_buffer
CURSOR=$saved_cursor
fi
saved_buffer=
saved_cursor=1
}
Expand Down

0 comments on commit 498695f

Please sign in to comment.