Skip to content

Commit c7c4628

Browse files
committed
fix: double update better-escape
1 parent 344bff5 commit c7c4628

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: lua/plugins/better-escape.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
--- Ensure the cursor is where i expect it to be after escaping
2+
local function esc() return vim.api.nvim_win_get_cursor(0)[2] > 1 and "<esc>l" or "<esc>" end
13
---@type LazySpec
24
return {
35
"max397574/better-escape.nvim",
46
opts = {
57
mappings = {
68
i = {
7-
j = { k = "<Esc>" },
8-
k = { j = "<Esc>" },
9+
j = { k = esc },
10+
k = { j = esc },
911
},
1012
},
11-
--- Ensure the cursor is where i expect it to be after escaping
12-
keys = function() return vim.api.nvim_win_get_cursor(0)[2] > 1 and "<esc>l" or "<esc>" end,
1313
},
1414
event = { "InsertEnter" },
1515
}

0 commit comments

Comments
 (0)