commit fb0c3f85de70f3f37622d837977a97656cdaeb93
parent a24da6944cba9fbf7cb7ba60c0b4c23609dc9a6b
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sat, 12 Nov 2005 05:20:14 +0000
in get_page_start(), fix test so that we scroll through the line in
8-character chunks when COLS is greater than 8, not when COLS is greater
than 9
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -119,6 +119,11 @@ CVS code -
- Move the code that replaces the text of the current file with
the text of the spell-checked file into its own function,
replace_buffer(). (DLR)
+- utils.c:
+ get_page_start()
+ - Fix test so that we scroll through the line in 8-character
+ chunks when COLS is greater than 8, not when COLS is greater
+ than 9. (DLR)
- winio.c:
nanoget_repaint()
- Rename parameter inputbuf to buf, for consistency. (DLR)
diff --git a/src/utils.c b/src/utils.c
@@ -403,7 +403,7 @@ size_t get_page_start(size_t column)
{
if (column == 0 || column < COLS - 1)
return 0;
- else if (COLS > 9)
+ else if (COLS > 8)
return column - 7 - (column - 7) % (COLS - 8);
else
return column - (COLS - 2);