From c43836bfc82a951d88323bb3217e334638b2b76c Mon Sep 17 00:00:00 2001 From: OIX Date: Mon, 21 Dec 2020 06:09:08 +0100 Subject: [PATCH] added: use 'T' as new state flag, to indicate when tab-char is used for indentation. --- src/nano.c | 5 +++-- src/winio.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nano.c b/src/nano.c index f33a086..4b99c64 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1095,8 +1095,9 @@ void do_toggle(int flag) #endif } - if (ISSET(STATEFLAGS) && (flag == AUTOINDENT || - flag == BREAK_LONG_LINES || flag == SOFTWRAP)) + if (ISSET(STATEFLAGS) && + (flag == AUTOINDENT || flag == TABS_TO_SPACES || + flag == BREAK_LONG_LINES || flag == SOFTWRAP)) titlebar(NULL); enabled = ISSET(flag); diff --git a/src/winio.c b/src/winio.c index b755286..f51a10b 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1887,7 +1887,7 @@ void titlebar(const char *path) const char *state = ""; /* The state of the current buffer -- "Modified", "View", or "". */ #ifndef NANO_TINY - char sf[] = "IMLRS"; // stateflag string + char sf[] = "IMLRST"; // stateflag string #endif char *caption; /* The presentable form of the pathname. */ @@ -1947,6 +1947,7 @@ void titlebar(const char *path) if(!ISSET(BREAK_LONG_LINES)) sf[2]=CLEAR; // L if(!recording) sf[3]=CLEAR; // R if(!ISSET(SOFTWRAP)) sf[4]=CLEAR; // S + if( ISSET(TABS_TO_SPACES)) sf[5]=CLEAR; // T state = sf; } #endif -- 2.7.4