From 05f61f7e7ab314187ff5d28281a6d6d7facb17ae Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 19 Oct 2023 23:12:04 +0200 Subject: follow-up fixes after refactoring --- src/main/search-replace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/search-replace.c') 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, -- cgit v1.2.3