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>
master
Benno Schulenberg 2017-08-22 15:03:37 +02:00
parent fc367a32eb
commit 97896d30f1
1 changed files with 2 additions and 2 deletions

View File

@ -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