* Fix #516

* Fix

* Fix and tests

* fmt lint
This commit is contained in:
hrsh7th
2021-11-14 02:47:31 +09:00
committed by GitHub
parent e61f7c5acc
commit 753f5b7c92
10 changed files with 173 additions and 50 deletions

View File

@@ -6,13 +6,13 @@ local CTRL_S = vim.api.nvim_replace_termcodes('<C-s>', true, true, true)
api.get_mode = function()
local mode = vim.api.nvim_get_mode().mode:sub(1, 1)
if mode == 'i' then
return 'i' -- insert
return 'i' -- insert
elseif mode == 'v' or mode == 'V' or mode == CTRL_V then
return 'x' -- visual
return 'x' -- visual
elseif mode == 's' or mode == 'S' or mode == CTRL_S then
return 's' -- select
return 's' -- select
elseif mode == 'c' and vim.fn.getcmdtype() ~= '=' then
return 'c' -- cmdline
return 'c' -- cmdline
end
end