Skip to content

Commit

Permalink
fix: pressing <esc> has a 1 second delay (#311)
Browse files Browse the repository at this point in the history
Fixes #295
  • Loading branch information
mikavilpas authored Aug 3, 2024
1 parent 9fb9a97 commit c38ca8f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/yazi/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ function YaziFloatingWindow:open_and_display()
end,
})

-- LazyVim sets <esc><esc> to forcibly enter normal mode. This has been
-- confusing for some users. Let's disable it when using yazi.nvim only.
-- Prevents a bug with lazyvim involving which-key.nvim: pressing <esc> in
-- the terminal window opens which-key and ignores the keypress.
vim.keymap.set('t', '<esc>', '<esc>', { buffer = yazi_buffer })
vim.keymap.set({ 't' }, '<esc><esc>', '<Nop>', { buffer = yazi_buffer })

return self
end
Expand Down

0 comments on commit c38ca8f

Please sign in to comment.