Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
48254f92
Commit
48254f92
authored
Feb 18, 2016
by
Hisham
Browse files
Fix behavior of Panel on empty lists.
Closes #370.
parent
5ee67158
Changes
1
Hide whitespace changes
Inline
Side-by-side
Panel.c
View file @
48254f92
...
...
@@ -441,7 +441,7 @@ bool Panel_onKey(Panel* this, int key) {
}
// ensure selection within bounds
if
(
this
->
selected
<
0
)
{
if
(
this
->
selected
<
0
||
size
==
0
)
{
this
->
selected
=
0
;
this
->
needsRedraw
=
true
;
}
else
if
(
this
->
selected
>=
size
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment