aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 801c00933a..14758c8cea 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -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;
}