Commit f6b396f2 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: chuck an assert, and then condense the code and a comment

No related merge requests found
Showing with 3 additions and 10 deletions
+3 -10
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment