commit 97896d30f103477b09ecd0df2ec6ef25ba2f540a
parent fc367a32ebc7ed7059684233c80c06383cf91e6c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 22 Aug 2017 15:03:37 +0200
moving: use the correct formula for pushing the index forward
This helps to fix https://savannah.gnu.org/bugs/?51787.
Correction-by: David Lawrence Ramsey <pooka109@gmail.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/move.c b/src/move.c
@@ -70,8 +70,8 @@ size_t proper_x(const char *text, size_t leftedge, size_t column)
size_t index = actual_x(text, column);
#ifndef NANO_TINY
- if (ISSET(SOFTWRAP) && text[index] == '\t' &&
- column < leftedge + leftedge % tabsize)
+ if (ISSET(SOFTWRAP) && text[index] == '\t' && leftedge % tabsize != 0 &&
+ column < leftedge + tabsize)
index++;
#endif