Skip to content

Commit

Permalink
complete-word: restore mode to INSERT on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
rnpnr committed Mar 26, 2024
1 parent faa4089 commit 9154424
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/plugins/complete-word.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ vis:map(vis.modes.INSERT, "<C-n>", function()
out = out:sub(#prefix + 1, #out - 1)
file:insert(pos, out)
win.selection.pos = pos + #out
-- restore mode to what it was on entry
vis.mode = vis.modes.INSERT
end, "Complete word in file")

0 comments on commit 9154424

Please sign in to comment.