Skip to content

Commit

Permalink
feat(qfwin)!: < or > will jump last leaving position automatically
Browse files Browse the repository at this point in the history
It's extreme useful enough to break the default rule. Fortunately, press `''`
will move cursor to the current item for the user obsessed with default rule.
  • Loading branch information
kevinhwang91 committed Feb 20, 2022
1 parent 7c95277 commit 7f4fff7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/bqf/qfwin/handler.lua
Expand Up @@ -119,6 +119,8 @@ function M.nav_history(next)
local hist_num = (cur_nr - 1 + (next and count or last_nr - count)) % last_nr + 1

cmd(([[sil exe '%d%shi']]):format(hist_num, prefix))
cmd([[norm! m']])
M.restore_winview()

local qinfo = qlist:get_qflist({nr = 0, size = 0, title = 0})
local nr, size, title = qinfo.nr, qinfo.size, qinfo.title
Expand Down

0 comments on commit 7f4fff7

Please sign in to comment.