aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorVVKot <volodymyr.kot.ua@gmail.com>2021-02-13 19:06:37 +0000
committerVVKot <volodymyr.kot.ua@gmail.com>2021-03-28 08:37:01 +0100
commit6752ac49682d63dfc7960e518ecbd6517c88392d (patch)
treeb0e4a27d32f23ea52f11ae1a6a4f24617f79a5e6 /src/nvim/screen.c
parentb79596eb5e942a299aa021a0f9a3f2db909294da (diff)
downloadrneovim-6752ac49682d63dfc7960e518ecbd6517c88392d.tar.gz
rneovim-6752ac49682d63dfc7960e518ecbd6517c88392d.tar.bz2
rneovim-6752ac49682d63dfc7960e518ecbd6517c88392d.zip
vim-patch:8.1.0105: all tab stops are the same
Problem: All tab stops are the same. Solution: Add the variable tabstop feature. (Christian Brabandt, closes vim/vim#2711) https://github.com/vim/vim/commit/04958cbaf25eea27eceedaa987adfb354ad5f7fd
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 749627de80..db1c338fe9 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3508,8 +3508,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
vcol_adjusted = vcol - MB_CHARLEN(p_sbr);
}
// tab amount depends on current column
- tab_len = (int)wp->w_buffer->b_p_ts
- - vcol_adjusted % (int)wp->w_buffer->b_p_ts - 1;
+ tab_len = tabstop_padding(vcol_adjusted,
+ wp->w_buffer->b_p_ts,
+ wp->w_buffer->b_p_vts_array) - 1;
if (!wp->w_p_lbr || !wp->w_p_list) {
n_extra = tab_len;