Introduction
Introduction Statistics Contact Development Disclaimer Help
tex: edit command and unspecified alternate file - neatvi - [fork] simple vi-ty…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 04a3edea64e70aae164a0550acaf5bf18ccac472
parent b56cd611f89d222d7184c4845e910ecc2a9fba59
Author: Ali Gholami Rudi <[email protected]>
Date: Sun, 31 May 2015 15:40:25 +0430
ex: edit command and unspecified alternate file
Diffstat:
M ex.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/ex.c b/ex.c
t@@ -172,11 +172,15 @@ static void ec_edit(char *ec)
char arg[EXLEN];
int fd;
ex_arg(ec, arg);
- if (!strcmp(arg, "%") || !arg[0]) {
+ if (!arg[0] || !strcmp(arg, "%") || !strcmp(xpath, arg)) {
strcpy(arg, xpath);
} else if (!strcmp(arg, "#")) {
char xpath_tmp[PATHLEN];
int xrow_tmp = xrow;
+ if (!xpath_alt[0]) {
+ ex_show("\"#\" is unset\n");
+ return;
+ }
strcpy(xpath_tmp, xpath_alt);
strcpy(xpath_alt, xpath);
strcpy(xpath, xpath_tmp);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.