diff --git a/src/list_window.c b/src/list_window.c
index 4cf2c1b9d61cf9f783ab853a66b9a685f067f991..c2a4b012f51a76d12ae18fdec3a095b221bfbc8b 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
#include "command.h"
#include "colors.h"
#include "paint.h"
-#include "screen_message.h"
+#include "screen_status.h"
#include "i18n.h"
#include <assert.h>
list_window_get_range(lw, &range);
for (unsigned i = 0; i < lw->rows; i++) {
- const char *label;
-
wmove(lw->w, i, 0);
if (lw->start + i >= lw->length) {
break;
}
- label = callback(lw->start + i, callback_data);
+ const char *label = callback(lw->start + i, callback_data);
assert(label != NULL);
list_window_paint_row(lw->w, lw->cols,
void
list_window_paint2(const struct list_window *lw,
list_window_paint_callback_t paint_callback,
- void *callback_data)
+ const void *callback_data)
{
bool show_cursor = !lw->hide_cursor &&
(!options.hardware_cursor || lw->range_selection);
list_window_get_range(lw, &range);
for (unsigned i = 0; i < lw->rows; i++) {
- bool selected;
-
wmove(lw->w, i, 0);
if (lw->start + i >= lw->length) {
break;
}
- selected = show_cursor &&
+ bool selected = show_cursor &&
lw->start + i >= range.start &&
lw->start + i < range.end;
bool bell_on_wrap)
{
unsigned i = lw->selected + 1;
- const char *label;
assert(str != NULL);
do {
while (i < lw->length) {
- label = callback(i, callback_data);
+ const char *label = callback(i, callback_data);
assert(label != NULL);
if (match_line(label, str)) {
bool bell_on_wrap)
{
int i = lw->selected - 1;
- const char *label;
assert(str != NULL);
do {
while (i >= 0) {
- label = callback(i, callback_data);
+ const char *label = callback(i, callback_data);
assert(label != NULL);
if (match_line(label, str)) {
void *callback_data,
const char *str)
{
- unsigned i;
- const char *label;
-
assert(str != NULL);
- for (i = 0; i < lw->length; i++) {
- label = callback(i, callback_data);
+ for (unsigned i = 0; i < lw->length; i++) {
+ const char *label = callback(i, callback_data);
assert(label != NULL);
if (g_ascii_strncasecmp(label, str, strlen(str)) == 0) {
void *callback_data,
const char *str)
{
- unsigned i;
- const char *label;
- GRegex *regex;
-
assert(str != NULL);
- regex = compile_regex(str, options.jump_prefix_only);
+ GRegex *regex = compile_regex(str, options.jump_prefix_only);
if (regex == NULL)
return false;
- for (i = 0; i < lw->length; i++) {
- label = callback(i, callback_data);
+ for (unsigned i = 0; i < lw->length; i++) {
+ const char *label = callback(i, callback_data);
assert(label != NULL);
if (match_regex(regex, label)) {