fix(dirhistory): make sure to call built-in zle widgets (#9771)
Without this patch, if the called zle widgets have been redefined this plugin might come into
conflict. Related: #9770.
Diff
1diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh
2index 35c43d76ad7f06f273dbad3e4490c12b19a294af..ec1606940c94864f77640b2f8422b3c362754ddb 100644
3--- a/plugins/dirhistory/dirhistory.plugin.zsh
4+++ b/plugins/dirhistory/dirhistory.plugin.zsh
5@@ -108,16 +108,16 @@ function dirhistory_forward() {
6 # Bind keys to history navigation
7 function dirhistory_zle_dirhistory_back() {
8 # Erase current line in buffer
9- zle kill-buffer
10- dirhistory_back
11- zle accept-line
12+ zle .kill-buffer
13+ dirhistory_back
14+ zle .accept-line
15 }
1617 function dirhistory_zle_dirhistory_future() {
18 # Erase current line in buffer
19- zle kill-buffer
20+ zle .kill-buffer
21 dirhistory_forward
22- zle accept-line
23+ zle .accept-line
24 }
2526 zle -N dirhistory_zle_dirhistory_back
27@@ -160,15 +160,15 @@ function dirhistory_down() {
2829 # Bind keys to hierarchy navigation
30 function dirhistory_zle_dirhistory_up() {
31- zle kill-buffer # Erase current line in buffer
32+ zle .kill-buffer # Erase current line in buffer
33 dirhistory_up
34- zle accept-line
35+ zle .accept-line
36 }
3738 function dirhistory_zle_dirhistory_down() {
39- zle kill-buffer # Erase current line in buffer
40+ zle .kill-buffer # Erase current line in buffer
41 dirhistory_down
42- zle accept-line
43+ zle .accept-line
44 }
4546 zle -N dirhistory_zle_dirhistory_up