Skip to content

Commit

Permalink
fix(dirhistory): make sure to call built-in zle widgets (#9771)
Browse files Browse the repository at this point in the history
Without this patch, if the called zle widgets have been redefined this plugin might come into
conflict. Related: #9770.
  • Loading branch information
St茅phane Caron committed Mar 31, 2021
1 parent 2b1d412 commit 2d40b56
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plugins/dirhistory/dirhistory.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ function dirhistory_forward() {
# Bind keys to history navigation
function dirhistory_zle_dirhistory_back() {
# Erase current line in buffer
zle kill-buffer
dirhistory_back
zle accept-line
zle .kill-buffer
dirhistory_back
zle .accept-line
}

function dirhistory_zle_dirhistory_future() {
# Erase current line in buffer
zle kill-buffer
zle .kill-buffer
dirhistory_forward
zle accept-line
zle .accept-line
}

zle -N dirhistory_zle_dirhistory_back
Expand Down Expand Up @@ -160,15 +160,15 @@ function dirhistory_down() {

# Bind keys to hierarchy navigation
function dirhistory_zle_dirhistory_up() {
zle kill-buffer # Erase current line in buffer
zle .kill-buffer # Erase current line in buffer
dirhistory_up
zle accept-line
zle .accept-line
}

function dirhistory_zle_dirhistory_down() {
zle kill-buffer # Erase current line in buffer
zle .kill-buffer # Erase current line in buffer
dirhistory_down
zle accept-line
zle .accept-line
}

zle -N dirhistory_zle_dirhistory_up
Expand Down

0 comments on commit 2d40b56

Please sign in to comment.