From 819a5bf62fa31c893c9d0c6da17ef93a810a1e8c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 25 Sep 2023 10:09:51 +0200 Subject: [PATCH] fix: dont hide cursor on input. Fixes #585. Fixes #566 --- lua/noice/util/hacks.lua | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lua/noice/util/hacks.lua b/lua/noice/util/hacks.lua index 82fe83d..e781fcd 100644 --- a/lua/noice/util/hacks.lua +++ b/lua/noice/util/hacks.lua @@ -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(...) @@ -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", "" } })