summaryrefslogtreecommitdiff
path: root/src/main/cmds.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-01-25 09:50:28 +0100
committerAlbert Cervin <albert@acervin.com>2024-01-25 09:50:28 +0100
commitb5397df84c53e12376dcbb977148f08bd6765525 (patch)
tree9e654ff6b4ff5f9be11f978cea22cbf8c88449e7 /src/main/cmds.c
parentc27f5c5ed4bce91eaa50d7d1daa5335f186dcc36 (diff)
downloaddged-b5397df84c53e12376dcbb977148f08bd6765525.tar.gz
dged-b5397df84c53e12376dcbb977148f08bd6765525.tar.xz
dged-b5397df84c53e12376dcbb977148f08bd6765525.zip
Improve word navigation
Now behaves the way we want.
Diffstat (limited to 'src/main/cmds.c')
-rw-r--r--src/main/cmds.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/cmds.c b/src/main/cmds.c
index 506054b..f12b4d4 100644
--- a/src/main/cmds.c
+++ b/src/main/cmds.c
@@ -229,6 +229,11 @@ static void find_file_comp_inserted() { minibuffer_execute(); }
static int32_t open_file(struct buffers *buffers, struct window *active_window,
const char *pth) {
+
+ if (active_window == minibuffer_window()) {
+ return 1;
+ }
+
struct stat sb = {0};
if (stat(pth, &sb) < 0 && errno != ENOENT) {
minibuffer_echo("stat on %s failed: %s", pth, strerror(errno));
@@ -387,6 +392,11 @@ static int32_t scroll_down_cmd(struct command_ctx ctx, int argc,
};
static int32_t goto_line(struct command_ctx ctx, int argc, const char *argv[]) {
+ // don't want to goto line in minibuffer
+ if (ctx.active_window == minibuffer_window()) {
+ return 0;
+ }
+
if (argc == 0) {
return minibuffer_prompt(ctx, "line: ");
}