Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions lua/definitions/message.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
---@field confirm boolean


--@class ui.message.type
--
--@field normal boolean
--@field hidden boolean
--@field list boolean
--@field confirm boolean


---@class ui.message.style Message pstyle
---
---@field condition? fun(msg: ui.message.entry, lines: string[], extmarks: ui.message.extmarks): boolean Condition for this processor.
Expand Down Expand Up @@ -185,6 +177,7 @@

---@class ui.message.entry A message entry.
---
---@field id string | integer
---@field type? ui.message.type
---
---@field kind ui.message.kind
Expand Down
12 changes: 6 additions & 6 deletions lua/ui/cmdline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ cmdline.__render = function ()
local lines, extmarks, _ = cmdline.__lines();

local H = #lines;
vim.g.__ui_cmd_height = H;
vim.g.ui_cmd_height = H;

local win_config = {
---|fS
Expand Down Expand Up @@ -406,12 +406,12 @@ cmdline.__render = function ()
if spec.config.message.enable and package.loaded["ui.message"] then
log.assert(
"ui/cmdline.lua → message_refresh",
pcall(package.loaded["ui.message"].__render)
pcall(package.loaded["ui.message"].render)
);

log.assert(
"ui/cmdline.lua → showcmd_refresh",
pcall(package.loaded["ui.message"].__showcmd)
pcall(package.loaded["ui.message"].showcmd_resize)
);
end

Expand Down Expand Up @@ -540,7 +540,7 @@ cmdline.cmdline_hide = function ()

-- Reset exported height.
-- Also reset state.
vim.g.__ui_cmd_height = 0;
vim.g.ui_cmd_height = 0;
cmdline.old_state = {}; ---@diagnostic disable-line

local function close_callback ()
Expand All @@ -558,7 +558,7 @@ cmdline.cmdline_hide = function ()
if spec.config.message.enable and package.loaded["ui.message"] then
log.assert(
"ui/cmdline.lua",
pcall(package.loaded["ui.message"].__render)
pcall(package.loaded["ui.message"].render)
);
end

Expand Down Expand Up @@ -663,7 +663,7 @@ cmdline.setup = function ()
callback = function ()
-- Only redraw if the cmdline
-- window is visible.
if vim.g.__ui_cmd_height and vim.g.__ui_cmd_height > 0 then
if vim.g.ui_cmd_height and vim.g.ui_cmd_height > 0 then
log.assert(
"ui/cmdline.lua",
pcall(cmdline.__render)
Expand Down
Loading
Loading