Mercurial > vim
comparison runtime/doc/quickfix.txt @ 16019:096b8ccd855e v8.1.1015
patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number
commit https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 17 16:39:46 2019 +0100
patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem: Quickfix buffer shows up in list, can't get buffer number.
Solution: Make the quickfix buffer unlisted when the quickfix window is
closed. get the quickfix buffer number with getqflist().
(Yegappan Lakshmanan, closes #4113)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Mar 2019 16:45:11 +0100 |
parents | f0f06837a699 |
children | 28e3ba82d8c8 |
comparison
equal
deleted
inserted
replaced
16018:aa208549a80b | 16019:096b8ccd855e |
---|---|
494 If there already is a quickfix window, it will be made | 494 If there already is a quickfix window, it will be made |
495 the current window. It is not possible to open a | 495 the current window. It is not possible to open a |
496 second quickfix window. If [height] is given the | 496 second quickfix window. If [height] is given the |
497 existing window will be resized to it. | 497 existing window will be resized to it. |
498 | 498 |
499 *quickfix-buffer* | |
499 The window will contain a special buffer, with | 500 The window will contain a special buffer, with |
500 'buftype' equal to "quickfix". Don't change this! | 501 'buftype' equal to "quickfix". Don't change this! |
501 The window will have the w:quickfix_title variable set | 502 The window will have the w:quickfix_title variable set |
502 which will indicate the command that produced the | 503 which will indicate the command that produced the |
503 quickfix list. This can be used to compose a custom | 504 quickfix list. This can be used to compose a custom |
504 status line if the value of 'statusline' is adjusted | 505 status line if the value of 'statusline' is adjusted |
505 properly. Whenever this buffer is modified by a | 506 properly. Whenever this buffer is modified by a |
506 quickfix command or function, the |b:changedtick| | 507 quickfix command or function, the |b:changedtick| |
507 variable is incremented. | 508 variable is incremented. You can get the number of |
509 this buffer using the getqflist() and getloclist() | |
510 functions by passing the 'qfbufnr' item. For a | |
511 location list, this buffer is wiped out when the | |
512 location list is removed. | |
508 | 513 |
509 *:lop* *:lopen* | 514 *:lop* *:lopen* |
510 :lop[en] [height] Open a window to show the location list for the | 515 :lop[en] [height] Open a window to show the location list for the |
511 current window. Works only when the location list for | 516 current window. Works only when the location list for |
512 the current window is present. You can have more than | 517 the current window is present. You can have more than |
668 :echo getqflist({'lines' : ['a.c#10#Line 10'], 'efm':'%f#%l#%m'}).items | 673 :echo getqflist({'lines' : ['a.c#10#Line 10'], 'efm':'%f#%l#%m'}).items |
669 | 674 |
670 " get the quickfix list window id | 675 " get the quickfix list window id |
671 :echo getqflist({'winid' : 0}).winid | 676 :echo getqflist({'winid' : 0}).winid |
672 | 677 |
678 " get the quickfix list window buffer number | |
679 :echo getqflist({'qfbufnr' : 0}).qfbufnr | |
680 | |
673 " get the context of the current location list | 681 " get the context of the current location list |
674 :echo getloclist(0, {'context' : 0}).context | 682 :echo getloclist(0, {'context' : 0}).context |
675 | 683 |
676 " get the location list window id of the third window | 684 " get the location list window id of the third window |
677 :echo getloclist(3, {'winid' : 0}).winid | 685 :echo getloclist(3, {'winid' : 0}).winid |
686 | |
687 " get the location list window buffer number of the third window | |
688 :echo getloclist(3, {'qfbufnr' : 0}).qfbufnr | |
678 | 689 |
679 " get the file window id of a location list window (winnr: 4) | 690 " get the file window id of a location list window (winnr: 4) |
680 :echo getloclist(4, {'filewinid' : 0}).filewinid | 691 :echo getloclist(4, {'filewinid' : 0}).filewinid |
681 < | 692 < |
682 *setqflist-examples* | 693 *setqflist-examples* |