mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
feat(quickfix): support -q - to read 'errorfile' from stdin (#27303)
Note that this only works when stdin is a pipe.
This commit is contained in:
@@ -1065,7 +1065,9 @@ static int qf_setup_state(qfstate_T *pstate, char *restrict enc, const char *res
|
||||
}
|
||||
|
||||
if (efile != NULL
|
||||
&& (pstate->fd = os_fopen(efile, "r")) == NULL) {
|
||||
&& (pstate->fd = (strequal(efile, "-")
|
||||
? fdopen(os_open_stdin_fd(), "r")
|
||||
: os_fopen(efile, "r"))) == NULL) {
|
||||
semsg(_(e_openerrf), efile);
|
||||
return FAIL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user