commit 53352d0b261c0d29b5c038f985fb7b2a5ad848da
parent 1d3a4df3b3595e1c2786343cc8e1841b99413250
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 19 May 2019 17:48:08 +0200
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.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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. */