diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:58 +0000 |
commit | bee19c22d569e54513a9c591441c7f411811dc81 (patch) | |
tree | b990d2df9fddb8194bfe49e9205005a0d952bc1f /src/indent.c | |
parent | Adding upstream version 2:9.1.0199. (diff) | |
download | vim-97c93a6e6cafbb0d7a9eb94a18a7cadeb8e23a9f.tar.xz vim-97c93a6e6cafbb0d7a9eb94a18a7cadeb8e23a9f.zip |
Adding upstream version 2:9.1.0374.upstream/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]; } /* |