commit 2b0bcc7ceed899dc228931c9d4d8619e4e0fb599
parent 3b5f650621e8153bc7201a171575c902f4d0b306
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 17 Nov 2021 10:25:32 +0100
feedback: show a relevant message for M-O when the syntax has 'tabgives'
When the syntax contains a 'tabgives' command, toggling the conversion
of tabs-to-spaces has no effect -- not for the current file. So, tell
the user that and don't change the flag.
This fixes https://savannah.gnu.org/bugs/?61496.
Bug existed since version 4.5, since 'tabgives' was introduced.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1086,6 +1086,13 @@ void toggle_this(int flag)
openfile->firstcolumn = 0;
refresh_needed = TRUE;
break;
+ case TABS_TO_SPACES:
+ if (openfile->syntax && openfile->syntax->tab) {
+ statusline(AHEM, _("Current syntax determines Tab"));
+ TOGGLE(flag);
+ return;
+ }
+ break;
case WHITESPACE_DISPLAY:
titlebar(NULL);
refresh_needed = TRUE;