Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
fitrh committed Sep 6, 2022
1 parent 4eefe78 commit 7abb725
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lua/modes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@ M.setup = function(opts)
local ok, current_mode = pcall(vim.fn.mode)
if not ok then
M.reset()
else
else
if current_mode == 'i' then
if key == utils.replace_termcodes('<esc>') then
M.reset()
return
end
end
end

if current_mode == 'n' then
-- reset if coming back from operator pending mode
if operator_started then
M.reset()
return
end
end

if key == 'y' then
M.highlight('copy')
Expand All @@ -221,22 +221,22 @@ M.setup = function(opts)
operator_started = true
return
end
end
end

if
if
current_mode:lower() == 'v'
or current_mode == utils.replace_termcodes('<c-v>')
then
if
then
if
key == utils.replace_termcodes('<esc>')
or key == current_mode
then
then
M.reset()
else
else
M.highlight('visual')
operator_started = true
end
end
end
end
end
end)

Expand Down

0 comments on commit 7abb725

Please sign in to comment.