From 5298d5114c27b14d4583c6711fb2f51615bde7b5 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 16 May 2014 10:50:01 +0000
Subject: [PATCH] Removing an unneeded call of edit_refresh(), and using
 'size_t' instead of 'int' for line lengths. Patch by David Lawrence Ramsey.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    | 2 ++
 src/search.c | 1 -
 src/text.c   | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c34121d4..5f2d00ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 	* src/color.c, src/cut.c, src/text.c: Tweak some whitespace.
 	* src/global.c, src/move.c: Use TRUE and FALSE instead of 1 and 0.
 	* src/winio.c (edit_draw): Mention the name of the tickling character.
+	* src/search.c (goto_line_posx): Remove unneeded call of edit_refresh.
+	* src/text.c (do_undo, do_redo): Use size_t for line lengths.
 
 2014-05-15  Mark Majeres  <mark@engine12.com>
 	* src/*, but mainly src/text.c (undo_cut, redo_cut, do_undo, do_redo):
diff --git a/src/search.c b/src/search.c
index 2480bb9c..da6ca517 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1019,7 +1019,6 @@ void goto_line_posx(ssize_t line, size_t pos_x)
     openfile->placewewant = xplustabs();
 
     edit_refresh_needed = TRUE;
-    edit_refresh();
 }
 
 /* Go to the specified line and column, or ask for them if interactive
diff --git a/src/text.c b/src/text.c
index 6a231e19..8d9432e6 100644
--- a/src/text.c
+++ b/src/text.c
@@ -420,7 +420,7 @@ void do_undo(void)
     bool gotolinecolumn = FALSE;
     undo *u = openfile->current_undo;
     filestruct *t = 0;
-    int len = 0;
+    size_t len = 0;
     char *undidmsg, *data;
     filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
 
@@ -555,7 +555,7 @@ void do_redo(void)
 {
     bool gotolinecolumn = FALSE;
     undo *u = openfile->undotop;
-    int len = 0;
+    size_t len = 0;
     char *undidmsg, *data;
 
     for (; u != NULL && u->next != openfile->current_undo; u = u->next)
-- 
GitLab