Skip to content

Commit

Permalink
fix: dont hide cursor on input. Fixes #585. Fixes #566
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Sep 25, 2023
1 parent 74c2902 commit 819a5bf
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lua/noice/util/hacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ end
---@see https://github.com/neovim/neovim/issues/20311
M.before_input = false
function M.fix_input()
local function wrap(fn, skip, redirect)
local function wrap(fn, skip)
return function(...)
if skip and skip(...) then
return fn(...)
Expand All @@ -157,21 +157,9 @@ function M.fix_input()
M.before_input = true
Router.update()

if redirect then
require("noice.ui").redirect()
end

if not redirect then
M.hide_cursor()
end

---@type boolean, any
local ok, ret = pcall(fn, ...)

if not redirect then
M.show_cursor()
end

-- clear any message right after input
Manager.clear({ event = "msg_show", kind = { "echo", "echomsg", "" } })

Expand Down

0 comments on commit 819a5bf

Please sign in to comment.