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
0ff54eba
Commit
0ff54eba
authored
Nov 20, 2010
by
Hisham Muhammad
Browse files
Fix search by process name when processes are filtered by user. Closes #2803481.
parent
d82e31be
Changes
1
Hide whitespace changes
Inline
Side-by-side
htop.c
View file @
0ff54eba
...
...
@@ -436,14 +436,14 @@ int main(int argc, char** argv) {
if
(
incSearchMode
)
{
doRefresh
=
false
;
int
size
=
Panel_size
(
panel
);
if
(
ch
==
KEY_F
(
3
))
{
int
here
=
Panel_getSelectedIndex
(
panel
);
int
size
=
ProcessList_size
(
pl
);
int
i
=
here
+
1
;
while
(
i
!=
here
)
{
if
(
i
==
size
)
i
=
0
;
Process
*
p
=
Process
List
_get
(
pl
,
i
);
Process
*
p
=
(
Process
*
)
Panel
_get
(
p
ane
l
,
i
);
if
(
String_contains_i
(
p
->
comm
,
incSearchBuffer
))
{
Panel_setSelected
(
panel
,
i
);
break
;
...
...
@@ -465,8 +465,8 @@ int main(int argc, char** argv) {
}
bool
found
=
false
;
for
(
int
i
=
0
;
i
<
ProcessList_size
(
pl
)
;
i
++
)
{
Process
*
p
=
Process
List
_get
(
pl
,
i
);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
Process
*
p
=
(
Process
*
)
Panel
_get
(
p
ane
l
,
i
);
if
(
String_contains_i
(
p
->
comm
,
incSearchBuffer
))
{
Panel_setSelected
(
panel
,
i
);
found
=
true
;
...
...
@@ -477,7 +477,6 @@ int main(int argc, char** argv) {
FunctionBar_draw
(
searchBar
,
incSearchBuffer
);
else
FunctionBar_drawAttr
(
searchBar
,
incSearchBuffer
,
CRT_colors
[
FAILED_SEARCH
]);
continue
;
}
if
(
isdigit
((
char
)
ch
))
{
...
...
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