mirror of https://github.com/xzeldon/htop.git
Allow to pass '/' for item search
This commit is contained in:
parent
bda07fa42b
commit
bc91a382f6
|
@ -53,7 +53,7 @@ static HandlerResult AvailableColumnsPanel_eventHandler(Panel* super, int ch) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (0 < ch && ch < 255 && isalpha((unsigned char)ch))
|
if (0 < ch && ch < 255 && isgraph((unsigned char)ch))
|
||||||
result = Panel_selectByTyping(super, ch);
|
result = Panel_selectByTyping(super, ch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if (0 < ch && ch < 255 && isalpha((unsigned char)ch))
|
if (0 < ch && ch < 255 && isgraph((unsigned char)ch))
|
||||||
result = Panel_selectByTyping(super, ch);
|
result = Panel_selectByTyping(super, ch);
|
||||||
if (result == BREAK_LOOP)
|
if (result == BREAK_LOOP)
|
||||||
result = IGNORED;
|
result = IGNORED;
|
||||||
|
|
|
@ -95,7 +95,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (0 < ch && ch < 255 && isalpha((unsigned char)ch))
|
if (0 < ch && ch < 255 && isgraph((unsigned char)ch))
|
||||||
result = Panel_selectByTyping(super, ch);
|
result = Panel_selectByTyping(super, ch);
|
||||||
if (result == BREAK_LOOP)
|
if (result == BREAK_LOOP)
|
||||||
result = IGNORED;
|
result = IGNORED;
|
||||||
|
|
2
Panel.c
2
Panel.c
|
@ -430,7 +430,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
|
||||||
this->eventHandlerState = xCalloc(100, sizeof(char));
|
this->eventHandlerState = xCalloc(100, sizeof(char));
|
||||||
char* buffer = this->eventHandlerState;
|
char* buffer = this->eventHandlerState;
|
||||||
|
|
||||||
if (0 < ch && ch < 255 && isalnum((unsigned char)ch)) {
|
if (0 < ch && ch < 255 && isgraph((unsigned char)ch)) {
|
||||||
int len = strlen(buffer);
|
int len = strlen(buffer);
|
||||||
if (!len) {
|
if (!len) {
|
||||||
if ('/' == ch) {
|
if ('/' == ch) {
|
||||||
|
|
Loading…
Reference in New Issue