The documentation for getloclist states:
Returns an empty Dictionary if there is no location list for the window {nr} or the window is not present.
However there is either always an empty location list to start, or a non-empty dictionary is returned when there is no list.
Reproduction steps:
vim -u NONE
:echo getloclist(1, {'all': 0})
Expected: {}
Actual: {'changedtick': 0, 'context': '', 'quickfixtextfunc': '', 'filewinid': 0, 'qfbufnr': 0, 'items': [], 'id': 0, 'nr': 0, 'winid': 0, 'idx': 0, 'title': '', 'size': 0}
The same result if I add a location list and then call setloclist(1, [], 'f'), I expect that getloclist would then return an empty dictionary.
Vim version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 20 2020 13:11:17) Included patches: 1-1718
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
The documentation for
getlocliststates:Returns an empty Dictionary if there is no location list for the window {nr} or the window is not present.
Fixed by 8.2.1727. The commit fixed another issue – hence why the message seems irrelevant – but the documentation was still updated in it.
—
You are receiving this because you commented.