commit 85e895508b0d7086cf206679927fb44fa0fbf3a7
parent 37c8232f4dbe13928aeb2239d2112451728e0d62
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 3 Mar 2019 14:50:43 +0100
display: scroll horizontally one column earlier
In this way, for single-width characters, one can see what character is
ahead of the cursor before actually moving the cursor to that position,
and, for double-width characters, the cursor never sits on a placeholder
but always shows the character that is actually there.
This addresses https://savannah.gnu.org/bugs/?55716.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/utils.c b/src/utils.c
@@ -367,10 +367,10 @@ char *free_and_assign(char *dest, char *src)
* get_page_start(column) < COLS). */
size_t get_page_start(size_t column)
{
- if (column < editwincols - 1 || ISSET(SOFTWRAP) || column == 0)
+ if (column + 2 < editwincols || ISSET(SOFTWRAP) || column == 0)
return 0;
else if (editwincols > 8)
- return column - 7 - (column - 7) % (editwincols - 8);
+ return column - 6 - (column - 6) % (editwincols - 8);
else
return column - (editwincols - 2);
}