fix(cmd): toggle tooltips

resolves #2815
This commit is contained in:
Jan De Dobbeleer 2022-09-23 08:39:55 +02:00 committed by Jan De Dobbeleer
parent babe425f3f
commit 2429d46435

View file

@ -23,6 +23,7 @@ end
local endedit_time = 0
local last_duration = 0
local tip
local tooltips_enabled = ::TOOLTIPS::
local tooltip_active = false
local cached_prompt = {}
@ -216,7 +217,7 @@ function ohmyposh_space(rl_buffer)
end
end
if rl.setbinding then
if tooltips_enabled and rl.setbinding then
clink.onbeginedit(function () tip = nil cached_prompt = {} end)
rl.setbinding(' ', [["luafunc:ohmyposh_space"]], 'emacs')
end