diff options
| author | Albert Cervin <albert@acervin.com> | 2023-10-19 23:12:04 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-10-19 23:12:04 +0200 |
| commit | 05f61f7e7ab314187ff5d28281a6d6d7facb17ae (patch) | |
| tree | 193055fddeb00fecb5bd3f47794af5e950668112 /src/main/search-replace.c | |
| parent | 54c9b4b533210b77be998f458ff96bdc54272f64 (diff) | |
| download | dged-05f61f7e7ab314187ff5d28281a6d6d7facb17ae.tar.gz dged-05f61f7e7ab314187ff5d28281a6d6d7facb17ae.tar.xz dged-05f61f7e7ab314187ff5d28281a6d6d7facb17ae.zip | |
follow-up fixes after refactoring
Diffstat (limited to 'src/main/search-replace.c')
| -rw-r--r-- | src/main/search-replace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/search-replace.c b/src/main/search-replace.c index cd12d5d..a94e2b1 100644 --- a/src/main/search-replace.c +++ b/src/main/search-replace.c @@ -275,9 +275,8 @@ void do_search(struct buffer_view *view, const char *pattern, bool reverse) { // find the "nearest" match if (m.found) { - buffer_view_goto(view, - (struct location){.line = m.closest.begin.line, - .col = m.closest.begin.col}); + buffer_view_goto(view, (struct location){.line = m.closest.begin.line, + .col = m.closest.begin.col}); } else { minibuffer_echo_timeout(4, "%s not found", pattern); } @@ -291,7 +290,8 @@ int32_t search_interactive(struct command_ctx ctx, int argc, // recall the last search, if any if (g_last_search != NULL) { struct buffer_view *view = window_buffer_view(minibuffer_window()); - buffer_set_text(view->buffer, (uint8_t *)g_last_search, strlen(g_last_search)); + buffer_set_text(view->buffer, (uint8_t *)g_last_search, + strlen(g_last_search)); pattern = g_last_search; } } else { @@ -302,7 +302,7 @@ int32_t search_interactive(struct command_ctx ctx, int argc, pattern = p; } - minibuffer_set_prompt(search_prompt(*(bool*)ctx.userdata)); + minibuffer_set_prompt(search_prompt(*(bool *)ctx.userdata)); if (pattern != NULL) { do_search(window_buffer_view(minibuffer_target_window()), pattern, |
