aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.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/hardcopy.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/hardcopy.c')
-rw-r--r--src/nvim/hardcopy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index 4ec949759c..abba5425e7 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -890,8 +890,11 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T
* Appropriately expand any tabs to spaces.
*/
if (line[col] == TAB || tab_spaces != 0) {
- if (tab_spaces == 0)
- tab_spaces = (int)(curbuf->b_p_ts - (print_pos % curbuf->b_p_ts));
+ if (tab_spaces == 0) {
+ tab_spaces = tabstop_padding(print_pos,
+ curbuf->b_p_ts,
+ curbuf->b_p_vts_array);
+ }
while (tab_spaces > 0) {
need_break = mch_print_text_out((char_u *)" ", 1);