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
3c4326b4
Commit
3c4326b4
authored
Aug 27, 2015
by
Hisham Muhammad
Browse files
Don't select last item when clicking past the end of the panel.
parent
6082db21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Panel.c
View file @
3c4326b4
...
...
@@ -254,7 +254,10 @@ int Panel_size(Panel* this) {
void
Panel_setSelected
(
Panel
*
this
,
int
selected
)
{
assert
(
this
!=
NULL
);
selected
=
MIN
(
Vector_size
(
this
->
items
)
-
1
,
selected
);
int
size
=
Vector_size
(
this
->
items
);
if
(
selected
>=
size
)
{
return
;
}
if
(
selected
<
0
)
selected
=
0
;
this
->
selected
=
selected
;
...
...
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