diff src/ex_docmd.c @ 14051:c1ead25ed819 v8.1.0043

patch 8.1.0043: ++bad argument of :edit does not work properly commit https://github.com/vim/vim/commit/7580849df9d6c7c515f5ed784019336d8a8ec0f0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 12 12:39:41 2018 +0200 patch 8.1.0043: ++bad argument of :edit does not work properly Problem: ++bad argument of :edit does not work properly. Solution: Return FAIL from get_bad_opt() only when there is no valid argument. (Dominique Pelle, Christian Brabandt, closes #2966, closes #2947)
author Christian Brabandt <cb@256bit.org>
date Tue, 12 Jun 2018 12:45:07 +0200
parents bccd66fa00c1
children a94bc6a7b29e
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -5318,7 +5318,9 @@ get_bad_opt(char_u *p, exarg_T *eap)
 	eap->bad_char = BAD_DROP;
     else if (MB_BYTE2LEN(*p) == 1 && p[1] == NUL)
 	eap->bad_char = *p;
-    return FAIL;
+    else
+	return FAIL;
+    return OK;
 }
 #endif