From 53352d0b261c0d29b5c038f985fb7b2a5ad848da Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 19 May 2019 17:48:08 +0200 Subject: [PATCH] files: try matching a syntax after scooping data from standard input The blank filename should not give any match, but maybe the header line or the magic finds a fitting syntax. This fixes https://savannah.gnu.org/bugs/?56344. --- src/nano.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nano.c b/src/nano.c index 6dddcb4f..750ff0dc 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1097,8 +1097,11 @@ bool scoop_stdin(void) } /* Read the input into a new buffer. */ - open_buffer("", TRUE); + make_new_buffer(); read_file(stream, 0, "stdin", TRUE); +#ifdef ENABLE_COLOR + color_update(); +#endif fprintf(stderr, ".\n"); /* Reconnect the tty as the input source. */