Skip to content

Commit

Permalink
refact: remove now obsolete esc action during cuts
Browse files Browse the repository at this point in the history
- sending an escape when not in normal mode should end selection after
  cutting in visual modes. Since the recent changes we should be fine
  without it now.
  • Loading branch information
ttytm committed Mar 1, 2023
1 parent 98613bf commit 19173eb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lua/karen-yank/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ end
---@param key DeleteKey @vim key parent
function M.cut(key)
handlers.handle_num_regs()

key = '"0' .. key

if vim.api.nvim_get_mode()["mode"] == "n" then return key end
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<ESC>", true, false, true), "n", false)

return key
return '"0' .. key
end

---@param kind "motion"|"line"|"trail"
Expand Down

0 comments on commit 19173eb

Please sign in to comment.