Skip to content

Opening the preview window overwrites keymap for 'q' #38

@jeff-dh

Description

@jeff-dh

When you open the preview window in JABS the keymap for q get's overwritten for that buffer. That's hard coded:

-- function M.previewBuf()
    [...]
    -- Close preview with "q"
    api.nvim_buf_set_keymap(buf, "n", "q",
        [[:lua require'jabs'.closePreviewBuf()<CR>]],
        { nowait = true, noremap = true, silent = true })
    [...]

The mapping still exists after the preview window is closed and if you open the same buffer in a different window -- for editing -- the mapping is still active (and calls closePreviewBuf).

If q would not be mapped to any other command this might not be toooooo bad, but q is mapped to start a recording by default and that's not possible anymore.......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions