Skip to content

Commit

Permalink
feat(popup): add q keymap to quit
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaogang authored and lewis6991 committed Apr 3, 2024
1 parent 4db6e85 commit b45ff86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/gitsigns/popup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ local function create_win(bufnr, opts, id)
local group_id = api.nvim_create_augroup(group, {})
local old_cursor = api.nvim_win_get_cursor(0)

vim.keymap.set('n', 'q', '<cmd>quit!<cr>', { silent = true, buffer = bufnr })

api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
group = group_id,
callback = function()
Expand Down

0 comments on commit b45ff86

Please sign in to comment.