From 6ad6b8586207b7d51d3744b76140040debe3783b Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 28 Jun 2005 06:16:30 +0000
Subject: [PATCH] more miscellaneous minor fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   |  2 ++
 src/nano.c  | 10 ++++++----
 src/winio.c |  2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1bf3c0e1..f5976050 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -339,6 +339,8 @@ CVS code -
   titlebar()
 	- Use actual_x() to calculate the number of characters VERMSG
 	  takes up, in case it's UTF-8. (DLR)
+  do_cursorpos()
+	- Properly display the value of totsize as unsigned. (DLR)
   do_help()
 	- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
 	  consistency. (DLR)
diff --git a/src/nano.c b/src/nano.c
index bf9930fa..fc2ef686 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -3986,13 +3986,15 @@ bool do_mouse(void)
 	    sameline = (mouse_y == current_y);
 
 	    /* Move to where the click occurred. */
-	    for (; current_y < mouse_y && current->next != NULL; current_y++)
+	    for (; current_y < mouse_y && current->next != NULL;
+		current_y++)
 		current = current->next;
-	    for (; current_y > mouse_y && current->prev != NULL; current_y--)
+	    for (; current_y > mouse_y && current->prev != NULL;
+		current_y--)
 		current = current->prev;
 
-	    xcur = actual_x(current->data, get_page_start(xplustabs()) +
-		mouse_x);
+	    xcur = actual_x(current->data,
+		get_page_start(xplustabs()) + mouse_x);
 
 #ifndef NANO_SMALL
 	    /* Clicking where the cursor is toggles the mark, as does
diff --git a/src/winio.c b/src/winio.c
index 2400cd49..2b0fcf66 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3813,7 +3813,7 @@ void do_cursorpos(bool constant)
 	int bytepct = (totsize == 0) ? 0 : 100 * i / totsize;
 
 	statusbar(
-		_("line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"),
+		_("line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%lu (%d%%)"),
 		current->lineno, totlines, linepct, (unsigned long)xpt,
 		(unsigned long)cur_len, colpct, (unsigned long)i,
 		(unsigned long)totsize, bytepct);
-- 
GitLab