Fix cmdline screen cursor

This commit is contained in:
hrsh7th
2021-11-16 13:42:38 +09:00
parent 3e5ee9c789
commit 4d800fbcab

View File

@@ -53,7 +53,8 @@ end
api.get_screen_cursor = function()
if api.is_cmdline_mode() then
return api.get_cursor()
local cursor = api.get_cursor()
return { cursor[1], cursor[2] + 1 }
end
local cursor = api.get_cursor()
local pos = vim.fn.screenpos(0, cursor[1], cursor[2] + 1)