diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-14 15:33:06 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-27 14:10:28 -0500 |
commit | 2c59277ca867cb3cb0144adedcfe05373d5498de (patch) | |
tree | b0e300dd9cd10698d3f1f19641855a6a0e38a488 /src/nvim/quickfix.c | |
parent | f224f3fbf11ffd3095843c597045ca95c8241fcf (diff) | |
download | rneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.tar.gz rneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.tar.bz2 rneovim-2c59277ca867cb3cb0144adedcfe05373d5498de.zip |
vim-patch:7.4.2010
Problem: There is a :cbottom command but no :lbottom command.
Solution: Add :lbottom. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/537ef08408c50e0c4104d57f74993b3b0ed9560d
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index c40b7173c5..93d0df1076 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2449,10 +2449,20 @@ static void qf_win_goto(win_T *win, linenr_T lnum) curbuf = curwin->w_buffer; } -// :cbottom command. +// :cbottom/:lbottom command. void ex_cbottom(exarg_T *eap) { - win_T *win = qf_find_win(&ql_info); + qf_info_T *qi = &ql_info; + + if (eap->cmdidx == CMD_lbottom) { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) { + EMSG(_(e_loclist)); + return; + } + } + + win_T *win = qf_find_win(qi); if (win != NULL && win->w_cursor.lnum != win->w_buffer->b_ml.ml_line_count) { qf_win_goto(win, win->w_buffer->b_ml.ml_line_count); |