nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 7e1648fdb00656a81fdd0ec36739a9ec4c4cf649
parent e05dfda2beca0cf157dcd8e4cc18d2a8192a6533
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 18 Apr 2017 14:54:11 +0200

help: set tabsize to the default width while showing a help text

So that the shortcut explanations get properly aligned.

Diffstat:
Msrc/help.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/help.c b/src/help.c @@ -106,6 +106,7 @@ void do_help(void) int line_size; int saved_margin = margin; /* For avoiding the line numbers on the help screen. */ + ssize_t was_tabsize = tabsize; char *saved_answer = (answer != NULL) ? strdup(answer) : NULL; /* Store current answer when user invokes help at the prompt. */ unsigned stash[sizeof(flags) / sizeof(flags[0])]; @@ -124,7 +125,8 @@ void do_help(void) fclose(fp); - /* Set help_text as the string to display. */ + /* Compose the help text from all the pieces. */ + tabsize = 8; help_init(); inhelp = TRUE; location = 0; @@ -266,6 +268,7 @@ void do_help(void) free(answer); answer = saved_answer; + tabsize = was_tabsize; remove(tempfilename); free(tempfilename);