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.
master
Benno Schulenberg 2019-05-19 17:48:08 +02:00
parent 1d3a4df3b3
commit 53352d0b26
1 changed files with 4 additions and 1 deletions

View File

@ -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. */