aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-28 13:40:34 -0400
committerGitHub <noreply@github.com>2021-03-28 13:40:34 -0400
commit63c2a7af2da3998167c7b1b06fb461b20b144c78 (patch)
tree77aa1b22e65a65c62fa4a062bb88945e02f5d5ca /src/nvim/hardcopy.c
parent6d4a922e07e857b46d882ea96decce7c7c6e2a30 (diff)
parenta70d904ad0e2037c7fb2ae10a20f840af3544496 (diff)
downloadrneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.tar.gz
rneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.tar.bz2
rneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.zip
Merge pull request #13851 from VVKot/vim-8.1.0105
vim-patch:8.1.{0105,0114,0116,0126,0138,0154,0479,0542,0936}
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);