fixup! vim-patch:8.2.3019: location list only has the start position.

This commit is contained in:
Jan Edmund Lazo 2021-07-31 16:49:25 -04:00
parent e4fedf5156
commit 5cead86975
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 9 additions and 5 deletions

View File

@ -37,9 +37,9 @@ for _, c in ipairs({'l', 'c'}) do
-- Second line of each entry (i.e. `nr=-1, …`) was obtained from actual
-- results. First line (i.e. `{lnum=…`) was obtained from legacy test.
local list = {
{lnum=700, col=10, text='Line 700', module='',
{lnum=700, end_lnum=0, col=10, end_col=0, text='Line 700', module='',
nr=-1, bufnr=2, valid=1, pattern='', vcol=0, ['type']=''},
{lnum=800, col=15, text='Line 800', module='',
{lnum=800, end_lnum=0, col=15, end_col=0, text='Line 800', module='',
nr=-1, bufnr=3, valid=1, pattern='', vcol=0, ['type']=''},
}
eq(list, getlist())
@ -58,7 +58,7 @@ for _, c in ipairs({'l', 'c'}) do
]]):format(file))
command(('%s %s'):format(addfcmd, file))
list[#list + 1] = {
lnum=900, col=30, text='Line 900', module='',
lnum=900, end_lnum=0, col=30, end_col=0, text='Line 900', module='',
nr=-1, bufnr=5, valid=1, pattern='', vcol=0, ['type']='',
}
eq(list, getlist())
@ -71,9 +71,9 @@ for _, c in ipairs({'l', 'c'}) do
command('enew!')
command(('%s %s'):format(getfcmd, file))
list = {
{lnum=222, col=77, text='Line 222', module='',
{lnum=222, end_lnum=0, col=77, end_col=0, text='Line 222', module='',
nr=-1, bufnr=2, valid=1, pattern='', vcol=0, ['type']=''},
{lnum=333, col=88, text='Line 333', module='',
{lnum=333, end_lnum=0, col=88, end_col=0, text='Line 333', module='',
nr=-1, bufnr=3, valid=1, pattern='', vcol=0, ['type']=''},
}
eq(list, getlist())

View File

@ -2026,7 +2026,9 @@ describe('LSP', function()
local expected = { {
bufnr = 2,
col = 5,
end_col = 0,
lnum = 4,
end_lnum = 0,
module = "",
nr = 0,
pattern = "",
@ -2098,7 +2100,9 @@ describe('LSP', function()
local expected = { {
bufnr = 2,
col = 5,
end_col = 0,
lnum = 4,
end_lnum = 0,
module = "",
nr = 0,
pattern = "",