feat(Mode): adapt to `showmode` option

pull/20/head
Iron-E 1 year ago
parent ba75e9b4d3
commit 69beec5e8e
No known key found for this signature in database
GPG Key ID: 83A6AEB40395D40D

@ -137,7 +137,7 @@ function Mode:get_user_input()
end
-- echo the indicator.
utils.api.hi_echo(self.indicator)
self:show_name()
-- capture input.
local user_input = vim.fn.getchar()
@ -209,6 +209,13 @@ return
Mode
)
self.show_name = (not vim.o.showmode) and utils.api.redraw or function()
utils.api.redraw()
vim.api.nvim_command('echohl ' .. self.indicator.hl .. " | echon '" .. self.indicator.str .. "'")
vim.api.nvim_command 'echohl None'
end
-- define the exit flag
self.supress_exit = supress_exit or false

Loading…
Cancel
Save