[PATCH] Allow 'set whitespacedisplay' in .nanorc

Peter Michaux <[email protected]> Wed, 23 Apr 2025 11:47:58 -0700
Newsgroups gmane.editors.nano.devel
Message-ID <CAG0y48Dm85-GBwVVGx+XZAZMajo7W_5Pb93FYmWSVWc=CWiM-A@mail.gmail.com>
This patch allows users to enable the display of visible whitespace
characters via their .nanorc configuration file by using 'set
whitespacedisplay'.

Previously, this option could only be activated while editing with M-P.
Making it accessible from the config file improves usability and
consistency with other display-related settings.

This change simply adds the necessary line in the rcfile parser to
recognize the option.

Peter
0001-Allow-set-whitespacedisplay-in-.nanorc.patch (application/octet-stream, 840 B)
From 92d7e05cc9c439624d57d9be50fa6ee5d85cbff8 Mon Sep 17 00:00:00 2001
From: Peter Michaux <[email protected]>
Date: Wed, 23 Apr 2025 11:42:19 -0700
Subject: [PATCH] Allow 'set whitespacedisplay' in .nanorc

This makes it possible to enable visible whitespace characters
from the configuration file using 'set whitespacedisplay'.

Signed-off-by: Peter Michaux <[email protected]>
---
 src/rcfile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/rcfile.c b/src/rcfile.c
index 2c55bc4f..0f324ea0 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -117,6 +117,7 @@ static const rcoption rcopts[] = {
 	{"trimblanks", TRIM_BLANKS},
 	{"unix", MAKE_IT_UNIX},
 	{"whitespace", 0},
+	{"whitespacedisplay", WHITESPACE_DISPLAY},
 	{"wordbounds", WORD_BOUNDS},
 	{"wordchars", 0},
 	{"zap", LET_THEM_ZAP},
-- 
2.39.5 (Apple Git-154)