Hi,

Op wo 3 feb. 2021 15:58 schreef Bram Moolenaar <[email protected]>:

>
> Patch 8.2.2454
> Problem:    Leading space can not be made visible.
>
> *** ../vim-8.2.2453/src/drawline.c      2020-11-25 13:48:58.880233814 +0100
> --- src/drawline.c
> ***************
> *** 744,749 ****
> --- 746,764 ----
>                 --trailcol;
>             trailcol += (colnr_T) (ptr - line);
>         }
> +       // find end of leading whitespace
> +       if (lcs_lead)
> +       {
> +           leadcol = 0;
> +           while (VIM_ISWHITE(ptr[leadcol]))
> +               ++leadcol;
> +           if (ptr[leadcol] == NUL)
> +               // in a line full of spaces all of them are treated as
> trailing
> +               leadcol = (colnr_T)0;
> +           else
> +               // keep track of the first column not filled with spaces
> +               leadcol += (colnr_T) (ptr - line) + 1;
> +       }
>       }
>

I guess this won't work for multi byte characters, although these won't
match whitespace. So, the code probably works as is... ignore this comment
;-)

Christ van Willegen

>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CA%2BOt1Oy%2BK_nDUKS52vuvOfdPKvJg_Q8aXna9iWW7dsHM3z_yjg%40mail.gmail.com.
  • Patch 8.2.2454 Bram Moolenaar
    • Re: Patch 8.2.2454 Christ van Willegen

Raspunde prin e-mail lui