aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-14 17:59:24 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-15 12:56:56 +0100
commit1c56750f7b6796e850a9299358dc6a187c6278bf (patch)
tree3fe936e9b95966402dd05c29813a51f91175438b /vis-cmds.c
parente29a0da9deef521694247421e82448c0a9ab3d73 (diff)
downloadvis-1c56750f7b6796e850a9299358dc6a187c6278bf.tar.gz
vis-1c56750f7b6796e850a9299358dc6a187c6278bf.tar.xz
vis: generalize special stdin handling
In preparation to move argument parsing code out of vis.c.
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 582f1a8..b3c1de8 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -431,7 +431,7 @@ static bool cmd_wq(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor
if (!win)
return false;
File *file = win->file;
- bool unmodified = !file->is_stdin && !file->name && !text_modified(file->text);
+ bool unmodified = file->fd == -1 && !file->name && !text_modified(file->text);
if (unmodified || cmd_write(vis, win, cmd, argv, cur, range))
return cmd_quit(vis, win, cmd, argv, cur, range);
return false;