tpope / vim-unimpaired

unimpaired.vim: Pairs of handy bracket mappings
https://www.vim.org/scripts/script.php?script_id=1590
3.31k stars 205 forks source link

Bugfix: Check loclist before quickfix so [f works in loclist #222

Closed idbrii closed 2 years ago

idbrii commented 2 years ago

Fix [f in loclist fails gives message about quickfix instead of doing :lolder

:h getwininfo() says: loclist 1 if showing a location list quickfix 1 if quickfix or location list window

Since quickfix is set for both types of windows, we need to check it last.

Repro:

h getloc
lgetbuffer
h :lgetbuffer
lgetbuffer
lopen
" at this point [f will fail but lolder will not