Patch 8.2.3019

2 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 19, 2021, 2:46:12 PM6/19/21
to vim...@googlegroups.com

Patch 8.2.3019
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closes #8393)
Files: runtime/doc/eval.txt, src/quickfix.c,
src/testdir/dumps/Test_quickfix_cwindow_1.dump,
src/testdir/dumps/Test_quickfix_cwindow_2.dump,
src/testdir/test_quickfix.vim, src/testdir/test_tagjump.vim,
src/testdir/test_vim9_expr.vim


*** ../vim-8.2.3018/runtime/doc/eval.txt 2021-06-07 18:27:35.896235064 +0200
--- runtime/doc/eval.txt 2021-06-19 20:34:02.994737528 +0200
***************
*** 5827,5833 ****
--- 5841,5850 ----
bufname() to get the name
module module name
lnum line number in the buffer (first line is 1)
+ end_lnum
+ end of line number if the item is multiline
col column number (first column is 1)
+ end_col end of column number if the item has range
vcol |TRUE|: "col" is visual column
|FALSE|: "col" is byte index
nr error number
*** ../vim-8.2.3018/src/quickfix.c 2021-06-19 18:22:50.079707396 +0200
--- src/quickfix.c 2021-06-19 20:34:02.994737528 +0200
***************
*** 30,42 ****
qfline_T *qf_next; // pointer to next error in the list
qfline_T *qf_prev; // pointer to previous error in the list
linenr_T qf_lnum; // line number where the error occurred
int qf_fnum; // file number for the line
int qf_col; // column where the error occurred
int qf_nr; // error number
char_u *qf_module; // module name for this error
char_u *qf_pattern; // search pattern for the error
char_u *qf_text; // description of the error
! char_u qf_viscol; // set to TRUE if qf_col is screen column
char_u qf_cleared; // set to TRUE if line has been deleted
char_u qf_type; // type of the error (mostly 'E'); 1 for
// :helpgrep
--- 30,45 ----
qfline_T *qf_next; // pointer to next error in the list
qfline_T *qf_prev; // pointer to previous error in the list
linenr_T qf_lnum; // line number where the error occurred
+ linenr_T qf_end_lnum; // line number when the error has range or zero
int qf_fnum; // file number for the line
int qf_col; // column where the error occurred
+ int qf_end_col; // column when the error has range or zero
int qf_nr; // error number
char_u *qf_module; // module name for this error
char_u *qf_pattern; // search pattern for the error
char_u *qf_text; // description of the error
! char_u qf_viscol; // set to TRUE if qf_col and qf_end_col is
! // screen column
char_u qf_cleared; // set to TRUE if line has been deleted
char_u qf_type; // type of the error (mostly 'E'); 1 for
// :helpgrep
***************
*** 165,171 ****
static callback_T qftf_cb;

static void qf_new_list(qf_info_T *qi, char_u *qf_title);
! static int qf_add_entry(qf_list_T *qfl, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
static void qf_free(qf_list_T *qfl);
static char_u *qf_types(int, int);
static int qf_get_fnum(qf_list_T *qfl, char_u *, char_u *);
--- 168,174 ----
static callback_T qftf_cb;

static void qf_new_list(qf_info_T *qi, char_u *qf_title);
! static int qf_add_entry(qf_list_T *qfl, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, long end_lnum, int col, int end_col, int vis_col, char_u *pattern, int nr, int type, int valid);
static void qf_free(qf_list_T *qfl);
static char_u *qf_types(int, int);
static int qf_get_fnum(qf_list_T *qfl, char_u *, char_u *);
***************
*** 174,179 ****
--- 177,183 ----
static char_u *qf_guess_filepath(qf_list_T *qfl, char_u *);
static void qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
static void qf_fmt_text(char_u *text, char_u *buf, int bufsize);
+ static void qf_range_text(qfline_T *qfp, char_u *buf, int bufsize);
static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
static win_T *qf_find_win(qf_info_T *qi);
static buf_T *qf_find_buf(qf_info_T *qi);
***************
*** 899,905 ****
--- 903,911 ----
char_u *errmsg;
int errmsglen;
long lnum;
+ long end_lnum;
int col;
+ int end_col;
char_u use_viscol;
char_u *pattern;
int enr;
***************
*** 1235,1241 ****
--- 1241,1249 ----
if (!qf_multiscan)
fields->errmsg[0] = NUL;
fields->lnum = 0;
+ fields->end_lnum = 0;
fields->col = 0;
+ fields->end_col = 0;
fields->use_viscol = FALSE;
fields->enr = -1;
fields->type = 0;
***************
*** 1630,1636 ****
--- 1638,1646 ----
0,
fields->errmsg,
fields->lnum,
+ fields->end_lnum,
fields->col,
+ fields->end_col,
fields->use_viscol,
fields->pattern,
fields->enr,
***************
*** 2053,2059 ****
--- 2063,2071 ----
int bufnum, // buffer number or zero
char_u *mesg, // message
long lnum, // line number
+ long end_lnum, // line number for end
int col, // column
+ int end_col, // column for end
int vis_col, // using visual column
char_u *pattern, // search pattern
int nr, // error number
***************
*** 2082,2088 ****
--- 2094,2102 ----
return QF_FAIL;
}
qfp->qf_lnum = lnum;
+ qfp->qf_end_lnum = end_lnum;
qfp->qf_col = col;
+ qfp->qf_end_col = end_col;
qfp->qf_viscol = vis_col;
if (pattern == NULL || *pattern == NUL)
qfp->qf_pattern = NULL;
***************
*** 2239,2245 ****
--- 2253,2261 ----
0,
from_qfp->qf_text,
from_qfp->qf_lnum,
+ from_qfp->qf_end_lnum,
from_qfp->qf_col,
+ from_qfp->qf_end_col,
from_qfp->qf_viscol,
from_qfp->qf_pattern,
from_qfp->qf_nr,
***************
*** 3555,3565 ****
msg_puts_attr(":", qfSepAttr);
if (qfp->qf_lnum == 0)
IObuff[0] = NUL;
- else if (qfp->qf_col == 0)
- sprintf((char *)IObuff, "%ld", qfp->qf_lnum);
else
! sprintf((char *)IObuff, "%ld col %d",
! qfp->qf_lnum, qfp->qf_col);
sprintf((char *)IObuff + STRLEN(IObuff), "%s",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
msg_puts_attr((char *)IObuff, qfLineAttr);
--- 3571,3578 ----
msg_puts_attr(":", qfSepAttr);
if (qfp->qf_lnum == 0)
IObuff[0] = NUL;
else
! qf_range_text(qfp, IObuff, IOSIZE);
sprintf((char *)IObuff + STRLEN(IObuff), "%s",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
msg_puts_attr((char *)IObuff, qfLineAttr);
***************
*** 3686,3691 ****
--- 3699,3735 ----
}

/*
+ * Range information from lnum, col, end_lnum, and end_col.
+ * Put the result in "buf[bufsize]".
+ */
+ static void
+ qf_range_text(qfline_T *qfp, char_u *buf, int bufsize)
+ {
+ int len;
+ vim_snprintf((char *)buf, bufsize, "%ld", qfp->qf_lnum);
+ len = (int)STRLEN(buf);
+
+ if (qfp->qf_end_lnum > 0 && qfp->qf_lnum != qfp->qf_end_lnum)
+ {
+ vim_snprintf((char *)buf + len, bufsize - len,
+ "-%ld", qfp->qf_end_lnum);
+ len += (int)STRLEN(buf + len);
+ }
+ if (qfp->qf_col > 0)
+ {
+ vim_snprintf((char *)buf + len, bufsize - len, " col %d", qfp->qf_col);
+ len += (int)STRLEN(buf + len);
+ if (qfp->qf_end_col > 0 && qfp->qf_col != qfp->qf_end_col)
+ {
+ vim_snprintf((char *)buf + len, bufsize - len,
+ "-%d", qfp->qf_end_col);
+ len += (int)STRLEN(buf + len);
+ }
+ }
+ buf[len] = NUL;
+ }
+
+ /*
* Display information (list number, list size and the title) about a
* quickfix/location list.
*/
***************
*** 4565,4581 ****

if (qfp->qf_lnum > 0)
{
! vim_snprintf((char *)IObuff + len, IOSIZE - len, "%ld",
! qfp->qf_lnum);
len += (int)STRLEN(IObuff + len);

- if (qfp->qf_col > 0)
- {
- vim_snprintf((char *)IObuff + len, IOSIZE - len,
- " col %d", qfp->qf_col);
- len += (int)STRLEN(IObuff + len);
- }
-
vim_snprintf((char *)IObuff + len, IOSIZE - len, "%s",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
len += (int)STRLEN(IObuff + len);
--- 4609,4617 ----

if (qfp->qf_lnum > 0)
{
! qf_range_text(qfp, IObuff + len, IOSIZE - len);
len += (int)STRLEN(IObuff + len);

vim_snprintf((char *)IObuff + len, IOSIZE - len, "%s",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
len += (int)STRLEN(IObuff + len);
***************
*** 5953,5959 ****
--- 5989,5997 ----
ml_get_buf(buf,
regmatch->startpos[0].lnum + lnum, FALSE),
regmatch->startpos[0].lnum + lnum,
+ regmatch->endpos[0].lnum + lnum,
regmatch->startpos[0].col + 1,
+ regmatch->endpos[0].col + 1,
FALSE, // vis_col
NULL, // search pattern
0, // nr
***************
*** 5996,6002 ****
--- 6034,6042 ----
duplicate_name ? 0 : buf->b_fnum,
str,
lnum,
+ 0,
matches[0] + col + 1,
+ 0,
FALSE, // vis_col
NULL, // search pattern
0, // nr
***************
*** 6626,6635 ****
buf[0] = qfp->qf_type;
buf[1] = NUL;
if (dict_add_number(dict, "bufnr", (long)bufnum) == FAIL
! || dict_add_number(dict, "lnum", (long)qfp->qf_lnum) == FAIL
! || dict_add_number(dict, "col", (long)qfp->qf_col) == FAIL
! || dict_add_number(dict, "vcol", (long)qfp->qf_viscol) == FAIL
! || dict_add_number(dict, "nr", (long)qfp->qf_nr) == FAIL
|| dict_add_string(dict, "module", qfp->qf_module) == FAIL
|| dict_add_string(dict, "pattern", qfp->qf_pattern) == FAIL
|| dict_add_string(dict, "text", qfp->qf_text) == FAIL
--- 6666,6677 ----
buf[0] = qfp->qf_type;
buf[1] = NUL;
if (dict_add_number(dict, "bufnr", (long)bufnum) == FAIL
! || dict_add_number(dict, "lnum", (long)qfp->qf_lnum) == FAIL
! || dict_add_number(dict, "end_lnum", (long)qfp->qf_end_lnum) == FAIL
! || dict_add_number(dict, "col", (long)qfp->qf_col) == FAIL
! || dict_add_number(dict, "end_col", (long)qfp->qf_end_col) == FAIL
! || dict_add_number(dict, "vcol", (long)qfp->qf_viscol) == FAIL
! || dict_add_number(dict, "nr", (long)qfp->qf_nr) == FAIL
|| dict_add_string(dict, "module", qfp->qf_module) == FAIL
|| dict_add_string(dict, "pattern", qfp->qf_pattern) == FAIL
|| dict_add_string(dict, "text", qfp->qf_text) == FAIL
***************
*** 7143,7150 ****
{
static int did_bufnr_emsg;
char_u *filename, *module, *pattern, *text, *type;
! int bufnum, valid, status, col, vcol, nr;
! long lnum;

if (first_entry)
did_bufnr_emsg = FALSE;
--- 7185,7192 ----
{
static int did_bufnr_emsg;
char_u *filename, *module, *pattern, *text, *type;
! int bufnum, valid, status, col, end_col, vcol, nr;
! long lnum, end_lnum;

if (first_entry)
did_bufnr_emsg = FALSE;
***************
*** 7153,7159 ****
--- 7195,7203 ----
module = dict_get_string(d, (char_u *)"module", TRUE);
bufnum = (int)dict_get_number(d, (char_u *)"bufnr");
lnum = (int)dict_get_number(d, (char_u *)"lnum");
+ end_lnum = (int)dict_get_number(d, (char_u *)"end_lnum");
col = (int)dict_get_number(d, (char_u *)"col");
+ end_col = (int)dict_get_number(d, (char_u *)"end_col");
vcol = (int)dict_get_number(d, (char_u *)"vcol");
nr = (int)dict_get_number(d, (char_u *)"nr");
type = dict_get_string(d, (char_u *)"type", TRUE);
***************
*** 7190,7196 ****
--- 7234,7242 ----
bufnum,
text,
lnum,
+ end_lnum,
col,
+ end_col,
vcol, // vis_col
pattern, // search pattern
nr,
***************
*** 8058,8065 ****
--- 8104,8114 ----
0,
line,
lnum,
+ 0,
(int)(p_regmatch->startp[0] - line)
+ 1, // col
+ (int)(p_regmatch->endp[0] - line)
+ + 1, // end_col
FALSE, // vis_col
NULL, // search pattern
0, // nr
*** ../vim-8.2.3018/src/testdir/dumps/Test_quickfix_cwindow_1.dump 2019-09-15 19:01:49.000000000 +0200
--- src/testdir/dumps/Test_quickfix_cwindow_1.dump 2021-06-19 20:34:02.994737528 +0200
***************
*** 4,12 ****
|m|a|t|c|h|e|s| @67
|~+0#4040ff13&| @73
|X+1#0000000&|C|w|i|n|d|o|w| @48|1|,|4| @11|A|l@1
! >X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4||+0#0000000&| |s|o|m|e| @52
! |X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2||+0#0000000&| |t|e|x|t| @52
! |X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6||+0#0000000&| |m|a|t|c|h|e|s| @49
|~+0#4040ff13&| @73
|[+3#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|1|,|1| @12|A|l@1
| +0&&@74
--- 4,12 ----
|m|a|t|c|h|e|s| @67
|~+0#4040ff13&| @73
|X+1#0000000&|C|w|i|n|d|o|w| @48|1|,|4| @11|A|l@1
! >X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4|-|5||+0#0000000&| |s|o|m|e| @50
! |X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2|-|3||+0#0000000&| |t|e|x|t| @50
! |X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6|-|7||+0#0000000&| |m|a|t|c|h|e|s| @47
|~+0#4040ff13&| @73
|[+3#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|1|,|1| @12|A|l@1
| +0&&@74
*** ../vim-8.2.3018/src/testdir/dumps/Test_quickfix_cwindow_2.dump 2019-09-15 19:01:51.000000000 +0200
--- src/testdir/dumps/Test_quickfix_cwindow_2.dump 2021-06-19 20:34:02.998737522 +0200
***************
*** 4,12 ****
|m|a|t|c|h|e|s| @67
|~+0#4040ff13&| @73
|X+3#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
! |X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4||+0#0000000&| |s|o|m|e| @52
! |X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2||+0#0000000&| |t|e|x|t| @52
! |X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6||+0#0000000&| |m|a|t|c|h|e|s| @49
|~+0#4040ff13&| @73
|[+1#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|2|,|1| @12|A|l@1
|:+0&&|c|n|e|x|t| @68
--- 4,12 ----
|m|a|t|c|h|e|s| @67
|~+0#4040ff13&| @73
|X+3#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
! |X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4|-|5||+0#0000000&| |s|o|m|e| @50
! |X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2|-|3||+0#0000000&| |t|e|x|t| @50
! |X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6|-|7||+0#0000000&| |m|a|t|c|h|e|s| @47
|~+0#4040ff13&| @73
|[+1#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|2|,|1| @12|A|l@1
|:+0&&|c|n|e|x|t| @68
*** ../vim-8.2.3018/src/testdir/test_quickfix.vim 2021-06-19 18:22:50.083707379 +0200
--- src/testdir/test_quickfix.vim 2021-06-19 20:34:02.998737522 +0200
***************
*** 134,139 ****
--- 134,154 ----
call assert_equal([' 2 Xtestfile1:1 col 3: Line1',
\ ' 3: non-error 2', ' 4 Xtestfile2:2 col 2: Line2'], l)

+ " Ranged entries
+ call g:Xsetlist([{'lnum':10,'text':'Line1'},
+ \ {'lnum':20,'col':10,'text':'Line2'},
+ \ {'lnum':30,'col':15,'end_col':20,'text':'Line3'},
+ \ {'lnum':40,'end_lnum':45,'text':'Line4'},
+ \ {'lnum':50,'end_lnum':55,'col':15,'text':'Line5'},
+ \ {'lnum':60,'end_lnum':65,'col':25,'end_col':35,'text':'Line6'}])
+ let l = split(execute('Xlist', ""), "\n")
+ call assert_equal([' 1:10: Line1',
+ \ ' 2:20 col 10: Line2',
+ \ ' 3:30 col 15-20: Line3',
+ \ ' 4:40-45: Line4',
+ \ ' 5:50-55 col 15: Line5',
+ \ ' 6:60-65 col 25-35: Line6'], l)
+
" Different types of errors
call g:Xsetlist([{'lnum':10,'col':5,'type':'W', 'text':'Warning','nr':11},
\ {'lnum':20,'col':10,'type':'e','text':'Error','nr':22},
***************
*** 644,649 ****
--- 659,665 ----
call assert_true(&buftype == 'help')
call assert_true(winnr() == 1)
call assert_true(winnr('$') == 2)
+ call assert_match('|\d\+ col \d\+-\d\+|', getbufline(winbufnr(2), 1)[0])

" This wipes out the buffer, make sure that doesn't cause trouble.
Xclose
***************
*** 1514,1523 ****
call s:setup_commands(a:cchar)

call g:Xsetlist([{'bufnr': a:bnum, 'lnum': 1},
! \ {'bufnr': a:bnum, 'lnum': 2}])
let l = g:Xgetlist()
call assert_equal(2, len(l))
call assert_equal(2, l[1].lnum)

Xnext
call g:Xsetlist([{'bufnr': a:bnum, 'lnum': 3}], 'a')
--- 1530,1542 ----
call s:setup_commands(a:cchar)

call g:Xsetlist([{'bufnr': a:bnum, 'lnum': 1},
! \ {'bufnr': a:bnum, 'lnum': 2, 'end_lnum': 3, 'col': 4, 'end_col': 5}])
let l = g:Xgetlist()
call assert_equal(2, len(l))
call assert_equal(2, l[1].lnum)
+ call assert_equal(3, l[1].end_lnum)
+ call assert_equal(4, l[1].col)
+ call assert_equal(5, l[1].end_col)

Xnext
call g:Xsetlist([{'bufnr': a:bnum, 'lnum': 3}], 'a')
***************
*** 2852,2858 ****
--- 2871,2879 ----
let l = g:Xgetlist()
call assert_equal(2, len(l))
call assert_equal(8, l[0].col)
+ call assert_equal(11, l[0].end_col)
call assert_equal(12, l[1].col)
+ call assert_equal(15, l[1].end_col)

1Xvimgrep ?Editor? Xtestfile*
let l = g:Xgetlist()
***************
*** 5098,5112 ****
call assert_equal('Tqfexpr', &quickfixtextfunc)
call assert_equal('',
\ g:Xgetlist({'quickfixtextfunc' : 1}).quickfixtextfunc)
! Xexpr ['F1:10:2:green', 'F1:20:4:blue']
Xwindow
call assert_equal('F1-L10C2-green', getline(1))
call assert_equal('F1-L20C4-blue', getline(2))
Xclose
set quickfixtextfunc&vim
Xwindow
! call assert_equal('F1|10 col 2| green', getline(1))
! call assert_equal('F1|20 col 4| blue', getline(2))
Xclose
set efm&
set quickfixtextfunc&
--- 5119,5139 ----
call assert_equal('Tqfexpr', &quickfixtextfunc)
call assert_equal('',
\ g:Xgetlist({'quickfixtextfunc' : 1}).quickfixtextfunc)
! call g:Xsetlist([
! \ { 'filename': 'F1', 'lnum': 10, 'col': 2,
! \ 'end_col': 7, 'text': 'green'},
! \ { 'filename': 'F1', 'lnum': 20, 'end_lnum': 25, 'col': 4,
! \ 'end_col': 8, 'text': 'blue'},
! \ ])
!
Xwindow
call assert_equal('F1-L10C2-green', getline(1))
call assert_equal('F1-L20C4-blue', getline(2))
Xclose
set quickfixtextfunc&vim
Xwindow
! call assert_equal('F1|10 col 2-7| green', getline(1))
! call assert_equal('F1|20-25 col 4-8| blue', getline(2))
Xclose
set efm&
set quickfixtextfunc&
***************
*** 5339,5345 ****
call setqflist(['bb'], 'a')
call assert_equal(1, line('$'))
call assert_equal(['Xfile1|10| aa'], getline(1, '$'))
! call assert_equal([{'lnum': 10, 'bufnr': bufnr('Xfile1'), 'col': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'aa'}], getqflist())
cclose
endfunc

--- 5366,5372 ----
call setqflist(['bb'], 'a')
call assert_equal(1, line('$'))
call assert_equal(['Xfile1|10| aa'], getline(1, '$'))
! call assert_equal([{'lnum': 10, 'end_lnum': 0, 'bufnr': bufnr('Xfile1'), 'col': 0, 'end_col': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'aa'}], getqflist())
cclose
endfunc

*** ../vim-8.2.3018/src/testdir/test_tagjump.vim 2020-10-02 18:48:02.846263669 +0200
--- src/testdir/test_tagjump.vim 2021-06-19 20:34:02.998737522 +0200
***************
*** 837,851 ****
ltag third
call assert_equal('Xfoo', bufname(''))
call assert_equal(3, line('.'))
! call assert_equal([{'lnum': 3, 'bufnr': bufnr('Xfoo'), 'col': 0,
! \ 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': 0, 'type': '',
! \ 'module': '', 'text': 'third'}], getloclist(0))

ltag second
call assert_equal(2, line('.'))
! call assert_equal([{'lnum': 0, 'bufnr': bufnr('Xfoo'), 'col': 0,
! \ 'pattern': '^\Vint second() {}\$', 'valid': 1, 'vcol': 0, 'nr': 0,
! \ 'type': '', 'module': '', 'text': 'second'}], getloclist(0))

call delete('Xtags')
call delete('Xfoo')
--- 837,852 ----
ltag third
call assert_equal('Xfoo', bufname(''))
call assert_equal(3, line('.'))
! call assert_equal([{'lnum': 3, 'end_lnum': 0, 'bufnr': bufnr('Xfoo'),
! \ 'col': 0, 'end_col': 0, 'pattern': '', 'valid': 1, 'vcol': 0,
! \ 'nr': 0, 'type': '', 'module': '', 'text': 'third'}], getloclist(0))

ltag second
call assert_equal(2, line('.'))
! call assert_equal([{'lnum': 0, 'end_lnum': 0, 'bufnr': bufnr('Xfoo'),
! \ 'col': 0, 'end_col': 0, 'pattern': '^\Vint second() {}\$',
! \ 'valid': 1, 'vcol': 0, 'nr': 0, 'type': '', 'module': '',
! \ 'text': 'second'}], getloclist(0))

call delete('Xtags')
call delete('Xfoo')
*** ../vim-8.2.3018/src/testdir/test_vim9_expr.vim 2021-06-17 22:08:13.376738576 +0200
--- src/testdir/test_vim9_expr.vim 2021-06-19 20:34:02.998737522 +0200
***************
*** 2943,2949 ****
--- 2943,2951 ----
loclist->setloclist(0)
assert_equal([{bufnr: bufnr,
lnum: 42,
+ end_lnum: 0,
col: 17,
+ end_col: 0,
text: 'wrong',
pattern: '',
valid: 1,
*** ../vim-8.2.3018/src/version.c 2021-06-19 18:22:50.083707379 +0200
--- src/version.c 2021-06-19 20:37:35.866398588 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 3019,
/**/

--
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages