From 9c821dfe2e96324539843eecfca24f0c025f4294 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 24 Nov 2015 11:42:19 +0000 Subject: [PATCH] Telling the user on the statusbar when a syntax name given on the command line does not exist. This fixes Savannah bug #46503. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5436 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ src/color.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 49cf9dce..d69c3c31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2015-11-24 Benno Schulenberg * doc/syntax/makefile.nanorc: Also recognize the extensions .make and .mk as Makefiles. Suggested by Emmanuel Bourg in Debian bug #804845. + * src/color.c (color_update): Tell the user when a syntax name given + on the command line does not exist. This fixes Savannah bug #46503. 2015-11-23 Benno Schulenberg * src/nano.c (main), src/winio.c (parse_kbinput): Make Ctrl+Left and diff --git a/src/color.c b/src/color.c index 3c33aa7e..bb6f9eff 100644 --- a/src/color.c +++ b/src/color.c @@ -180,6 +180,9 @@ void color_update(void) if (openfile->colorstrings != NULL) break; } + + if (openfile->colorstrings == NULL) + statusbar(_("Unknown syntax name: %s"), syntaxstr); } /* If we didn't specify a syntax override string, or if we did and -- 2.39.5