so markup can be tested more directly.
- [X] in search-replace if you repeat :A-Enter, chars get deleted - if
replacement string is shorter. If longer, they get added.
-- [ ] path completion in shell command. If cannot find look for '/'
+- [X] path completion in shell command. If cannot find look for '/'
following punctuation (=) and try there.
- [ ] resolve shift-left vs shift_left distinction - add a "fixed" suffix?
- [ ] should zoom affect whole window, not just pane?
if (wholebuf) {
d = str;
} else {
+ /* Need guess which part of the buf is the file name.
+ * This probably needs to be configurable, but lets
+ * decide the file name starts immediately after a
+ * space, or a '=' or ':' which is followed by a
+ * '/'.
+ */
initial = "";
d = str + strlen(str);
- while (d > str && d[-1] != ' ')
+ while (d > str &&
+ !(d[-1] == ' ' ||
+ (strchr(":=", d[-1]) && d[0] == '/')))
d -= 1;
}
d = file_normalize(ci->focus, d, initial);
}
fd = open(d, O_DIRECTORY|O_RDONLY);
if (fd < 0) {
+ call("Message:modal", ci->focus, 0, NULL,
+ strconcat(ci->focus, "Cannot open directory \"", d, "\""));
return Efail;
}
/* 32 means quiet */
call("doc:char", ci->focus, -strlen(b), start);
call("Replace", ci->focus, 1, start, cr.s);
mark_free(start);
+ } else {
+ call("Message:modal", ci->focus, 0, NULL,
+ strconcat(ci->focus, "No completion found for \"", b, "\"",
+ " in \"", d, "\""));
}
/* Now need to close the popup */
pane_close(pop);