aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/complete-word.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/plugins/complete-word.lua b/lua/plugins/complete-word.lua
index 7812751..5e355e8 100644
--- a/lua/plugins/complete-word.lua
+++ b/lua/plugins/complete-word.lua
@@ -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")