0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2518: 'listchars' should be window-local

Problem:    'listchars' should be window-local.
Solution:   Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
            closes #5206, closes #7850)
This commit is contained in:
Bram Moolenaar
2021-02-15 20:38:25 +01:00
parent 7c5b3c0369
commit eed9d46293
20 changed files with 302 additions and 112 deletions

View File

@@ -432,7 +432,8 @@ get_indent_str(
{
if (*ptr == TAB)
{
if (!list || lcs_tab1) // count a tab for what it is worth
if (!list || curwin->w_lcs_chars.tab1)
// count a tab for what it is worth
count += ts - (count % ts);
else
// In list mode, when tab is not set, count screen char width
@@ -462,7 +463,7 @@ get_indent_str_vtab(char_u *ptr, int ts, int *vts, int list)
{
if (*ptr == TAB) // count a tab for what it is worth
{
if (!list || lcs_tab1)
if (!list || curwin->w_lcs_chars.tab1)
count += tabstop_padding(count, ts, vts);
else
// In list mode, when tab is not set, count screen char width