fix(zsh): correct logic to enable tooltips

resolves #5288
This commit is contained in:
Jan De Dobbeleer 2024-07-24 13:06:59 +02:00 committed by Jan De Dobbeleer
parent 4a1aa2a7b4
commit 6f30788a16
2 changed files with 11 additions and 2 deletions

View file

@ -190,6 +190,15 @@ function _omp_create_widget() {
esac
}
function enable_poshtooltips() {
widget=${$(bindkey " "):2}
if [[ -z $widget ]]; then
widget=self-insert
fi
_omp_create_widget $widget _omp_render_tooltip
}
# legacy functions
function enable_poshtooltips() {}
function enable_poshtransientprompt() {}

View file

@ -12,7 +12,7 @@ func (f Feature) Zsh() Code {
case CursorPositioning:
return "_omp_cursor_positioning=1"
case Tooltips:
return "_omp_create_widget self-insert _omp_render_tooltip"
return "enable_poshtooltips"
case Transient:
return "_omp_create_widget zle-line-init _omp_zle-line-init"
case FTCSMarks: