mirror of https://github.com/xzeldon/htop.git
Make column operation more comfortable.
This commit is contained in:
parent
8fa33dc336
commit
460608d6e2
|
@ -59,10 +59,9 @@ HandlerResult AvailableColumnsPanel_eventHandler(Panel* super, int ch) {
|
||||||
case KEY_ENTER:
|
case KEY_ENTER:
|
||||||
case KEY_F(5):
|
case KEY_F(5):
|
||||||
{
|
{
|
||||||
int at = Panel_getSelectedIndex(this->columns) + 1;
|
int at = Panel_getSelectedIndex(this->columns);
|
||||||
if (at == Panel_getSize(this->columns))
|
|
||||||
at--;
|
|
||||||
Panel_insert(this->columns, at, (Object*) ListItem_new(text, 0));
|
Panel_insert(this->columns, at, (Object*) ListItem_new(text, 0));
|
||||||
|
Panel_setSelected(this->columns, at+1);
|
||||||
ColumnsPanel_update(this->columns);
|
ColumnsPanel_update(this->columns);
|
||||||
result = HANDLED;
|
result = HANDLED;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue