mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-10 13:10:29 +00:00
feat(Mode): adapt to showmode
option
This commit is contained in:
parent
ba75e9b4d3
commit
69beec5e8e
@ -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…
Reference in New Issue
Block a user