Skip to content

Commit

Permalink
fix(cmd): toggle tooltips
Browse files Browse the repository at this point in the history
resolves #2815
  • Loading branch information
JanDeDobbeleer committed Sep 23, 2022
1 parent babe425 commit 2429d46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shell/scripts/omp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

Expand Down Expand Up @@ -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

0 comments on commit 2429d46

Please sign in to comment.