vi: explain what vim 9.2 is doing with ":e FILE" escaping
No binary (build failed)
—
(log yok)
| @@ -2685,12 +2685,18 @@ static void setops(char *args, int flg_no) | |
| static char *expand_args(char *args) | |
| { | |
| char *s; | |
| - | const char *replace; |
| args = xstrdup(args); | |
| for (s = args; *s; s++) { | |
| + | const char *replace; |
| unsigned n; | |
| + | //NB: vim 9.2 replaces "\%" with "%" _over entire string_, |
| + | //then replaces "\c" with "c". Result: |
| + | // "\%" is "%" (ok), |
| + | // "\\" is "\" (ok), |
| + | // "\\%" is "\%" (!!!), not "\CURFILE" as you would think. |
| + | //We don't do that. Should we? |
| if (*s == '%') { | |
| replace = current_filename; | |
| } else if (*s == '#') { | |