Skip to content

Commit

Permalink
fix: better way of showing/hiding cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 25, 2022
1 parent 882e58c commit 10a97a0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/noice/util/hacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,14 @@ M._guicursor = nil
function M.hide_cursor()
if M._guicursor == nil then
M._guicursor = vim.go.guicursor
vim.go.guicursor = "a:NoiceHiddenCursor/NoiceHiddenCursor"
M._disable.guicursor = M.show_cursor
end
vim.go.guicursor = "a:NoiceHiddenCursor/NoiceHiddenCursor"
M._disable.guicursor = M.show_cursor
end

function M.show_cursor()
if M._guicursor then
vim.go.guicursor = M._guicursor
M._guicursor = nil
end
end

Expand Down

0 comments on commit 10a97a0

Please sign in to comment.