summaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:59 +0000
commitcccb21df3b4c6fe0aaa99743c418aa973aeebad0 (patch)
tree35a2d1f88d47e930fec425da1c1cb89b3ccae6e0 /src/indent.c
parentReleasing progress-linux version 2:9.1.0199-1~progress7.99u1. (diff)
downloadvim-cccb21df3b4c6fe0aaa99743c418aa973aeebad0.tar.xz
vim-cccb21df3b4c6fe0aaa99743c418aa973aeebad0.zip
Merging upstream version 2:9.1.0374.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c
index 56032fa..1dfde7d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -163,7 +163,7 @@ tabstop_start(colnr_T col, int ts, int *vts)
int excess;
if (vts == NULL || vts[0] == 0)
- return (col / ts) * ts;
+ return col - col % ts;
tabcount = vts[0];
for (t = 1; t <= tabcount; ++t)
@@ -174,7 +174,7 @@ tabstop_start(colnr_T col, int ts, int *vts)
}
excess = tabcol % vts[tabcount];
- return excess + ((col - excess) / vts[tabcount]) * vts[tabcount];
+ return col - (col - excess) % vts[tabcount];
}
/*