From d12fd4b1fb2a42c84a3e436fb1591979aaca9529 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Fri, 28 May 2004 15:05:56 +0000
Subject: [PATCH] add code to statusq() to *really* not allow "Full Justify"
 while in view mode

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

diff --git a/ChangeLog b/ChangeLog
index 58f77975..f346c22a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -290,6 +290,8 @@ CVS code -
 	- Remove apparently unneeded leaveok() calls. (David Benbennick)
   edit_refresh_clearok(), center_cursor()
 	- Removed, as they are now unnecessary. (David Benbennick)
+  statusq()
+	- Don't allow "Full Justify" when in view mode. (DLR)
   statusbar()
 	- Call reset_cursor() just before refreshing the edit window, so
 	  that slang and other non-ncurses versions of curses will
diff --git a/src/winio.c b/src/winio.c
index 3eea2908..981174f3 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2316,7 +2316,8 @@ int statusq(int allowtabs, const shortcut *s, const char *def,
 	resetstatuspos = 1;
 	break;
     case NANO_FULLJUSTIFY_KEY:
-	do_full_justify();
+	if (!ISSET(VIEW_MODE))
+	    do_full_justify();
 	resetstatuspos = 1;
 	break;
 #endif
-- 
GitLab