aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-01-23 01:41:00 +0100
committerMarco Hinz <mh.codebro@gmail.com>2019-01-26 14:45:47 +0100
commit352811fe5ff900e8d95695477dff821a5b860912 (patch)
tree94e91687fada2afefa3eee857473af5eb6a3f03f /src/nvim/charset.c
parentec5a4d862d71729569acf4afac4c371a09edc314 (diff)
downloadrneovim-352811fe5ff900e8d95695477dff821a5b860912.tar.gz
rneovim-352811fe5ff900e8d95695477dff821a5b860912.tar.bz2
rneovim-352811fe5ff900e8d95695477dff821a5b860912.zip
options: make 'fillchars'/'listchars' local to window
Using 'listchars' is a nice way to highlight tabs that were included by accident for buffers that set 'expandtab'. But maybe one does not want this for buffers that set 'noexpandtab', so now one can use: autocmd FileType go let &l:listchars .= ',tab: '
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index c220c4e347..010a155716 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -749,7 +749,7 @@ int vim_strnsize(char_u *s, int len)
///
/// @return Number of characters.
#define RET_WIN_BUF_CHARTABSIZE(wp, buf, p, col) \
- if (*(p) == TAB && (!(wp)->w_p_list || lcs_tab1)) { \
+ if (*(p) == TAB && (!(wp)->w_p_list || wp->w_p_lcs_chars.tab1)) { \
const int ts = (int) (buf)->b_p_ts; \
return (ts - (int)(col % ts)); \
} else { \
@@ -1149,7 +1149,7 @@ static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp)
{
int n;
- if ((*s == TAB) && (!wp->w_p_list || lcs_tab1)) {
+ if ((*s == TAB) && (!wp->w_p_list || wp->w_p_lcs_chars.tab1)) {
n = (int)wp->w_buffer->b_p_ts;
return n - (col % n);
}
@@ -1241,7 +1241,7 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
// When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set
// use a simple loop.
// Also use this when 'list' is set but tabs take their normal size.
- if ((!wp->w_p_list || (lcs_tab1 != NUL))
+ if ((!wp->w_p_list || (wp->w_p_lcs_chars.tab1 != NUL))
&& !wp->w_p_lbr
&& (*p_sbr == NUL)
&& !wp->w_p_bri ) {