From 6702d97d3c37c3a363ffc7c890578109f82f9f20 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 6 Feb 2023 22:14:59 +0100 Subject: [PATCH] fix(ui): cmdline is always blocking. Fixes #347 --- lua/noice/ui/init.lua | 2 +- lua/noice/util/init.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/noice/ui/init.lua b/lua/noice/ui/init.lua index 0150353..3922768 100644 --- a/lua/noice/ui/init.lua +++ b/lua/noice/ui/init.lua @@ -93,7 +93,7 @@ function M.enable() -- check if we need to update the ui if Manager.tick() > tick then - -- Util.debug(vim.inspect({ event, tick, kind, ... })) + -- Util.debug(vim.inspect({ event, Util.is_blocking(), tick, kind, ... })) if Util.is_blocking() then -- if event ~= "msg_show" then Util.try(Router.update) diff --git a/lua/noice/util/init.lua b/lua/noice/util/init.lua index 496b019..f912708 100644 --- a/lua/noice/util/init.lua +++ b/lua/noice/util/init.lua @@ -200,6 +200,7 @@ function M.is_blocking(opts) or opts.mode and blocking_mode and ("mode:" .. mode.mode) or opts.input and Hacks.before_input and "input" or opts.redraw and Hacks.inside_redraw and "redraw" + or #require("noice.ui.cmdline").cmdlines > 0 and "cmdline" or nil return reason ~= nil, reason end