summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.c b/main.c
index e8af990..7edb770 100644
--- a/main.c
+++ b/main.c
@@ -965,6 +965,14 @@ static TxtLoc indent_dedent_lines(TxtLoc start, TxtLoc end, int n) {
return txt_at(start.t, ofs);
}
+Str select_file(void) {
+ /* TODO: implement */
+ vui_clear();
+ vui_blit();
+ vui_key();
+ return (Str) { 0 };
+}
+
int main(int argc, const char **argv) {
ed_init(&e);
@@ -1108,8 +1116,14 @@ int main(int argc, const char **argv) {
err(1, "shell_replace");
}
} break;
+
case ' ':
switch ((u32)vui_key()) {
+ case 'f': {
+ Str s = select_file();
+ if (s.n > 0)
+ e.bufi = ed_buf_open(&e, str_to_cstr(s, &e.scratch));
+ } break;
case 'm':
build_file(eb->path, 1);
break;