summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74c1180)
raw | patch | inline | side by side (parent: 74c1180)
author | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 17:37:58 +0000 (19:37 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 17:37:58 +0000 (19:37 +0200) |
And call list_window_get_range() only if show_cursor is true.
src/list_window.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index 9e67f9f87a61b1bd257271d98e327794ba2e3250..124b48226fc601729c27b752906f61851b5cb3fd 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
list_window_callback_fn_t callback,
void *callback_data)
{
- bool show_cursor = !lw->hide_cursor;
- struct list_window_range range;
-
- show_cursor = show_cursor &&
+ bool show_cursor = !lw->hide_cursor &&
(!options.hardware_cursor || lw->range_selection);
+ struct list_window_range range;
- list_window_get_range(lw, &range);
+ if (show_cursor)
+ list_window_get_range(lw, &range);
for (unsigned i = 0; i < lw->rows; i++) {
const char *label;