Code

list_window: removed redundant range_base checks
authorMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:46:04 +0000 (18:46 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:46:04 +0000 (18:46 +0200)
No need to check range_base in list_window_check_selected().

src/list_window.c

index c78ff6ee55074d90628524921188942a537503fa..2111edc4eb4838dcb07c3cf1da3df5566f7defae 100644 (file)
@@ -90,11 +90,6 @@ list_window_check_selected(struct list_window *lw)
                        list_window_validate_index(lw, lw->selected_end);
                lw->range_base =
                        list_window_validate_index(lw, lw->range_base);
-
-               if(lw->range_base > lw->selected_end)
-                         lw->selected_end = lw->selected;
-               if(lw->range_base < lw->selected_start)
-                         lw->selected_start = lw->selected;
        }
        else
        {