From 915649bbe951602d0aa719a412977ab4ff7663ba Mon Sep 17 00:00:00 2001 From: ranjithshegde Date: Wed, 26 Oct 2022 10:36:30 +0200 Subject: [PATCH] fix(smart_move): Dont move `cmdline` view \#117 Added the smart_move function that avoids overlap. But it introduced some bugs with cmdline view set to `cmdline`. To avoid overlap with `mini` or other views, the cmdline itself would move to odd locations. This fixes that issue. --- lua/noice/view/nui.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/noice/view/nui.lua b/lua/noice/view/nui.lua index 19b11fda..18c801dc 100644 --- a/lua/noice/view/nui.lua +++ b/lua/noice/view/nui.lua @@ -45,7 +45,10 @@ end -- Check if other floating windows are overlapping and move out of the way function NuiView:smart_move() - if not (self._opts.type == "popup" and self._opts.relative and self._opts.relative.type == "editor") then + if + not (self._opts.type == "popup" and self._opts.relative and self._opts.relative.type == "editor") + or self._opts.view == "cmdline" + then return end