// If the 'quickfixtextfunc' function returned a non-empty custom string
// for this entry, then use it.
if (qftf_str != NULL && *qftf_str != NUL)
+ {
ga_concat(gap, qftf_str);
+ ga_append(gap, NUL);
+ }
else
{
if (qfp->qf_module != NULL)
// Remove newlines and leading whitespace from the text.
// For an unrecognized line keep the indent, the compiler may
// mark a word with ^^^^.
- qf_fmt_text(gap, gap->ga_len > 3 ? skipwhite(qfp->qf_text) : qfp->qf_text);
+ qf_fmt_text(gap, gap->ga_len > 3 ? skipwhite(qfp->qf_text)
+ : qfp->qf_text);
}
- ga_append(gap, NUL);
-
- if (ml_append_buf(buf, lnum, gap->ga_data, gap->ga_len + 1, FALSE) == FAIL)
+ if (ml_append_buf(buf, lnum, gap->ga_data, gap->ga_len, FALSE) == FAIL)
return FAIL;
return OK;
call StopVimInTerminal(buf)
endfunc
+def Test_textprop_in_quickfix_window()
+ enew!
+ var prop_type = 'my_prop'
+ prop_type_add(prop_type, {})
+
+ for lnum in range(1, 10)
+ setline(lnum, 'hello world')
+ endfor
+
+ cgetbuffer
+ copen
+
+ var bufnr = bufnr()
+ for lnum in range(1, line('$', bufnr->bufwinid()))
+ prop_add(lnum, 1, {
+ id: 1000 + lnum,
+ type: prop_type,
+ bufnr: bufnr,
+ })
+ endfor
+
+ prop_type_delete(prop_type)
+ cclose
+ bwipe!
+enddef
+
+
" vim: shiftwidth=2 sts=2 expandtab