mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0067: cannot show virtual text
Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
This commit is contained in:
@@ -3210,7 +3210,7 @@ vgetorpeek(int advance)
|
||||
&& (c = inchar(typebuf.tb_buf + typebuf.tb_off
|
||||
+ typebuf.tb_len, 3, 25L)) == 0)
|
||||
{
|
||||
colnr_T col = 0, vcol;
|
||||
colnr_T col = 0;
|
||||
char_u *ptr;
|
||||
|
||||
if (mode_displayed)
|
||||
@@ -3242,24 +3242,30 @@ vgetorpeek(int advance)
|
||||
{
|
||||
if (did_ai)
|
||||
{
|
||||
chartabsize_T cts;
|
||||
|
||||
/*
|
||||
* We are expecting to truncate the trailing
|
||||
* white-space, so find the last non-white
|
||||
* character -- webb
|
||||
*/
|
||||
col = vcol = curwin->w_wcol = 0;
|
||||
curwin->w_wcol = 0;
|
||||
ptr = ml_get_curline();
|
||||
while (col < curwin->w_cursor.col)
|
||||
init_chartabsize_arg(&cts, curwin,
|
||||
curwin->w_cursor.lnum, 0, ptr, ptr);
|
||||
while (cts.cts_ptr < ptr + curwin->w_cursor.col)
|
||||
{
|
||||
if (!VIM_ISWHITE(ptr[col]))
|
||||
curwin->w_wcol = vcol;
|
||||
vcol += lbr_chartabsize(ptr, ptr + col,
|
||||
vcol);
|
||||
if (!VIM_ISWHITE(*cts.cts_ptr))
|
||||
curwin->w_wcol = cts.cts_vcol;
|
||||
cts.cts_vcol += lbr_chartabsize(&cts);
|
||||
if (has_mbyte)
|
||||
col += (*mb_ptr2len)(ptr + col);
|
||||
cts.cts_ptr +=
|
||||
(*mb_ptr2len)(cts.cts_ptr);
|
||||
else
|
||||
++col;
|
||||
++cts.cts_ptr;
|
||||
}
|
||||
clear_chartabsize_arg(&cts);
|
||||
|
||||
curwin->w_wrow = curwin->w_cline_row
|
||||
+ curwin->w_wcol / curwin->w_width;
|
||||
curwin->w_wcol %= curwin->w_width;
|
||||
|
Reference in New Issue
Block a user