From 44fb3e9991cbc2f428efd9d9ae8567ff866d19d9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 7 May 2021 12:33:22 +0200 Subject: [PATCH] tweaks: frob some whitespace, and rewrap a line --- src/search.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/search.c b/src/search.c index 3eb0baff..eb799762 100644 --- a/src/search.c +++ b/src/search.c @@ -82,7 +82,7 @@ void search_init(bool replacing, bool retain_answer) thedefault = nmalloc(strlen(disp) + 7); /* We use (COLS / 3) here because we need to see more on the line. */ sprintf(thedefault, " [%s%s]", disp, - (breadth(last_search) > COLS / 3) ? "..." : ""); + (breadth(last_search) > COLS / 3) ? "..." : ""); free(disp); } else thedefault = copy_of(""); @@ -431,7 +431,7 @@ void go_looking(void) /* If we found something, and we're back at the exact same spot * where we started searching, then this is the only occurrence. */ if (didfind == 1 && openfile->current == was_current && - openfile->current_x == was_current_x) + openfile->current_x == was_current_x) statusline(REMARK, _("This is the only occurrence")); else if (didfind == 0) not_found_msg(last_search); @@ -473,8 +473,7 @@ int replace_regexp(char *string, bool create) /* And if create is TRUE, append the result of the * subexpression match to the new line. */ if (create) { - strncpy(string, openfile->current->data + - regmatches[num].rm_so, i); + strncpy(string, openfile->current->data + regmatches[num].rm_so, i); string += i; } } @@ -704,8 +703,8 @@ void ask_for_and_do_replacements(void) size_t begin_x = openfile->current_x; ssize_t numreplaced; int response = do_prompt(MREPLACEWITH, "", &replace_history, - /* TRANSLATORS: This is a prompt. */ - edit_refresh, _("Replace with")); + /* TRANSLATORS: This is a prompt. */ + edit_refresh, _("Replace with")); #ifdef ENABLE_HISTORIES /* When not "", add the replace string to the replace history list. */ @@ -732,7 +731,7 @@ void ask_for_and_do_replacements(void) if (numreplaced >= 0) statusline(REMARK, P_("Replaced %zd occurrence", - "Replaced %zd occurrences", numreplaced), numreplaced); + "Replaced %zd occurrences", numreplaced), numreplaced); } /* Go to the specified line and x position. */