summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-24 23:53:28 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-24 23:53:28 +0200
commit0119a59ffdfb21cf1c0a56e7ed6105e875150163 (patch)
treeb034a9624b677b5edb568134a041b995f4090f53 /src/option.c
parent675e8d6adb88d5b38087870dfda51c0205070741 (diff)
downloadvim-git-0119a59ffdfb21cf1c0a56e7ed6105e875150163.tar.gz
patch 8.1.0114: confusing variable namev8.1.0114
Problem: Confusing variable name. Solution: Rename new_ts to new_vts_array. Change zero to NULL.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/option.c b/src/option.c
index d7d411772..1ba8a8c2e 100644
--- a/src/option.c
+++ b/src/option.c
@@ -12844,7 +12844,7 @@ tabstop_start(colnr_T col, int ts, int *vts)
int t;
int excess;
- if (vts == 0 || vts[0] == 0)
+ if (vts == NULL || vts[0] == 0)
return (col / ts) * ts;
tabcount = vts[0];
@@ -12878,10 +12878,11 @@ tabstop_fromto(
int tabcount;
int t;
- if (vts == 0 || vts[0] == 0)
+ if (vts == NULL || vts[0] == 0)
{
int tabs = 0;
int initspc = ts - (start_col % ts);
+
if (spaces >= initspc)
{
spaces -= initspc;