diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:59 +0000 |
commit | cccb21df3b4c6fe0aaa99743c418aa973aeebad0 (patch) | |
tree | 35a2d1f88d47e930fec425da1c1cb89b3ccae6e0 /src/indent.c | |
parent | Releasing progress-linux version 2:9.1.0199-1~progress7.99u1. (diff) | |
download | vim-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.c | 4 |
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]; } /* |