From 2e2e7b13631547091b54bddae5d523823a71e43c Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Sat, 21 Nov 2015 23:44:58 +0200
Subject: [PATCH] listbox.c: remove redundant code.
This l->top calculation is already done in listbox_select_entry().
---
lib/widget/listbox.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/lib/widget/listbox.c b/lib/widget/listbox.c
index ab3fc1f..4861ce1 100644
a
|
b
|
listbox_key (WListbox * l, int key) |
330 | 330 | /* focus on listbox item N by '0'..'9' keys */ |
331 | 331 | if (key >= '0' && key <= '9') |
332 | 332 | { |
333 | | int oldpos = l->pos; |
334 | 333 | listbox_select_entry (l, key - '0'); |
335 | | |
336 | | /* need scroll to item? */ |
337 | | if (abs (oldpos - l->pos) > WIDGET (l)->lines) |
338 | | l->top = l->pos; |
339 | | |
340 | 334 | return MSG_HANDLED; |
341 | 335 | } |
342 | 336 | |