From 275bd28d3ed7a9d8fc336ea59613476989028501 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 16 May 2014 10:34:05 +0000
Subject: [PATCH] Tweaking some whitespace, using TRUE and FALSE instead of 1
 and 0, and mentioning the name of the terminal-tickling character (NBSP).
 Patch by David Lawrence Ramsey.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    | 5 +++++
 src/color.c  | 1 -
 src/cut.c    | 2 +-
 src/global.c | 2 +-
 src/move.c   | 4 ++--
 src/text.c   | 7 +++----
 src/winio.c  | 3 ++-
 7 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ab8baf4e..c34121d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-16  David Lawrence Ramsey  <pooka109@gmail.com>
+	* 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.
+
 2014-05-15  Mark Majeres  <mark@engine12.com>
 	* src/*, but mainly src/text.c (undo_cut, redo_cut, do_undo, do_redo):
 	Go to the correct positions for undoing/redoing the cuts and pastes.
diff --git a/src/color.c b/src/color.c
index 82febc07..7e8e1a40 100644
--- a/src/color.c
+++ b/src/color.c
@@ -392,7 +392,6 @@ void reset_multis_before(filestruct *fileptr, int mindex)
 	else
 	    break;
     }
-
     edit_refresh_needed = TRUE;
 }
 
diff --git a/src/cut.c b/src/cut.c
index 823ec6fb..6f98e743 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -44,7 +44,7 @@ void cutbuffer_reset(void)
  * current line. */
 void cut_line(void)
 {
-    if(!openfile->mark_begin)
+    if (!openfile->mark_begin)
 	openfile->mark_begin = openfile->current;
 
     if (openfile->current != openfile->filebot)
diff --git a/src/global.c b/src/global.c
index 453abd41..b65f2c7d 100644
--- a/src/global.c
+++ b/src/global.c
@@ -157,7 +157,7 @@ char *syntaxstr = NULL;
 
 #endif
 
-bool edit_refresh_needed = 0;
+bool edit_refresh_needed = FALSE;
 	/* Did a command mangle enough of the buffer refresh that we
 	 * should repaint the screen? */
 
diff --git a/src/move.c b/src/move.c
index 355fa027..9d73f97f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -33,7 +33,7 @@ void do_first_line(void)
     openfile->current_x = 0;
     openfile->placewewant = 0;
 
-    edit_refresh_needed = 1;
+    edit_refresh_needed = TRUE;
 }
 
 /* Move to the last line of the file. */
@@ -44,7 +44,7 @@ void do_last_line(void)
     openfile->placewewant = xplustabs();
     openfile->current_y = editwinrows - 1;
 
-    edit_refresh_needed = 1;
+    edit_refresh_needed = TRUE;
 }
 
 /* Move up one page. */
diff --git a/src/text.c b/src/text.c
index aee832e8..6a231e19 100644
--- a/src/text.c
+++ b/src/text.c
@@ -140,7 +140,7 @@ void do_delete(void)
 
     if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
 	if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
-	    edit_refresh_needed  = TRUE;
+	    edit_refresh_needed = TRUE;
 
     set_modified();
 
@@ -455,7 +455,6 @@ void do_undo(void)
 	undidmsg = _("text delete");
 	len = strlen(f->data) + strlen(u->strdata) + 1;
 	data = charalloc(len);
-
 	strncpy(data, f->data, u->begin);
 	strcpy(&data[u->begin], u->strdata);
 	strcpy(&data[u->begin + strlen(u->strdata)], &f->data[u->begin]);
@@ -506,7 +505,7 @@ void do_undo(void)
 	if (f->next) {
 	    filestruct *foo = f->next;
 	    f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(f->next->data) + 1);
-	    strcat(f->data,  f->next->data);
+	    strcat(f->data, f->next->data);
 	    unlink_node(foo);
 	    delete_node(foo);
 	}
@@ -946,7 +945,7 @@ void add_undo(undo_type current_action)
 
 	    filestruct *fs_buff = cutbuffer;
 	    if (fs_buff->lineno == cutbottom->lineno)
-		u->begin = fs->current_x +  get_totsize(fs_buff,cutbottom);
+		u->begin = fs->current_x + get_totsize(fs_buff, cutbottom);
 	    else {
 		/* Advance fs_buff to the last line in the cutbuffer. */
 		while (fs_buff->lineno != cutbottom->lineno && fs_buff->next != NULL)
diff --git a/src/winio.c b/src/winio.c
index 73ab9a60..d8dfaef2 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2497,7 +2497,8 @@ void edit_draw(filestruct *fileptr, const char *converted, int
     mvwaddstr(edit, line, 0, converted);
 #ifdef ENABLE_UTF8
     if (using_utf8())
-	/* Tickle the terminal into displaying two-column characters properly. */
+	/* Tickle the terminal into displaying two-column characters
+	 * properly, using Unicode 00A0 (No-Break Space). */
 	mvwaddstr(edit, line, COLS - 1, "\xC2\xA0\x00");
 #endif
 
-- 
GitLab