diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2024-03-25 18:43:15 -0600 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2024-03-25 18:44:26 -0600 |
| commit | 915442440ae8227f7e6fe6fa795cba3be36928e8 (patch) | |
| tree | 95fdea356c22a2ec2636f521565bb88c9a9dff11 | |
| parent | faa4089aea22ed390326f8d07b129ede04995087 (diff) | |
| download | vis-915442440ae8227f7e6fe6fa795cba3be36928e8.tar.gz vis-915442440ae8227f7e6fe6fa795cba3be36928e8.tar.xz | |
complete-word: restore mode to INSERT on exit
| -rw-r--r-- | lua/plugins/complete-word.lua | 2 |
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") |
