tweaks: chuck an assert, and then condense the code and a comment
parent
5561d22f19
commit
f6b396f206
13
src/search.c
13
src/search.c
|
@ -65,21 +65,14 @@ void regexp_cleanup(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* Indicate on the statusbar that the string at str was not found by the
|
||||
* last search. */
|
||||
/* Report on the status bar that the given string was not found. */
|
||||
void not_found_msg(const char *str)
|
||||
{
|
||||
char *disp;
|
||||
size_t numchars;
|
||||
|
||||
assert(str != NULL);
|
||||
|
||||
disp = display_string(str, 0, (COLS / 2) + 1, FALSE);
|
||||
numchars = actual_x(disp, strnlenpt(disp, COLS / 2));
|
||||
char *disp = display_string(str, 0, (COLS / 2) + 1, FALSE);
|
||||
size_t numchars = actual_x(disp, strnlenpt(disp, COLS / 2));
|
||||
|
||||
statusline(HUSH, _("\"%.*s%s\" not found"), numchars, disp,
|
||||
(disp[numchars] == '\0') ? "" : "...");
|
||||
|
||||
free(disp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue