diff options
| author | Albert Cervin <albert@acervin.com> | 2024-01-25 09:50:28 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-01-25 09:50:28 +0100 |
| commit | b5397df84c53e12376dcbb977148f08bd6765525 (patch) | |
| tree | 9e654ff6b4ff5f9be11f978cea22cbf8c88449e7 /src/main | |
| parent | c27f5c5ed4bce91eaa50d7d1daa5335f186dcc36 (diff) | |
| download | dged-b5397df84c53e12376dcbb977148f08bd6765525.tar.gz dged-b5397df84c53e12376dcbb977148f08bd6765525.tar.xz dged-b5397df84c53e12376dcbb977148f08bd6765525.zip | |
Improve word navigation
Now behaves the way we want.
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/cmds.c | 10 |
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: "); } |
