summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/edit.c b/commands/edit.c
index 3ab4beaa4f..f1e4e4d5c2 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -495,6 +495,10 @@ static int do_edit(int argc, char *argv[])
if (argc != 2)
return COMMAND_ERROR_USAGE;
+ buffer = NULL;
+ if(edit_read_file(argv[1]))
+ return 1;
+
screenwidth = 80;
/*
@@ -517,10 +521,6 @@ static int do_edit(int argc, char *argv[])
is_vi = true;
}
- buffer = NULL;
- if(edit_read_file(argv[1]))
- return 1;
-
cursx = 0;
cursy = 0;
textx = 0;