mirror of https://github.com/xzeldon/htop.git
clean inc search buffer code
This commit is contained in:
parent
843aded57c
commit
510213591b
8
htop.c
8
htop.c
|
@ -353,8 +353,6 @@ int main(int argc, char** argv) {
|
||||||
if (recalculate)
|
if (recalculate)
|
||||||
oldTime = newTime;
|
oldTime = newTime;
|
||||||
if (doRefresh) {
|
if (doRefresh) {
|
||||||
incSearchIndex = 0;
|
|
||||||
incSearchBuffer[0] = 0;
|
|
||||||
int currPos = Panel_getSelectedIndex(panel);
|
int currPos = Panel_getSelectedIndex(panel);
|
||||||
unsigned int currPid = 0;
|
unsigned int currPid = 0;
|
||||||
int currScrollV = panel->scrollV;
|
int currScrollV = panel->scrollV;
|
||||||
|
@ -429,8 +427,6 @@ int main(int argc, char** argv) {
|
||||||
incSearchBuffer[incSearchIndex] = 0;
|
incSearchBuffer[incSearchIndex] = 0;
|
||||||
} else {
|
} else {
|
||||||
incSearchMode = false;
|
incSearchMode = false;
|
||||||
incSearchIndex = 0;
|
|
||||||
incSearchBuffer[0] = 0;
|
|
||||||
FunctionBar_draw(defaultBar, NULL);
|
FunctionBar_draw(defaultBar, NULL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -729,8 +725,10 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
case KEY_F(3):
|
case KEY_F(3):
|
||||||
case '/':
|
case '/':
|
||||||
FunctionBar_draw(searchBar, incSearchBuffer);
|
incSearchIndex = 0;
|
||||||
|
incSearchBuffer[0] = 0;
|
||||||
incSearchMode = true;
|
incSearchMode = true;
|
||||||
|
FunctionBar_draw(searchBar, incSearchBuffer);
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
case KEY_F(5):
|
case KEY_F(5):
|
||||||
|
|
Loading…
Reference in New Issue