mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Pre-select the last sent signal in SignalsPanel
Instead of pre-selecting SIGTERM every time, select the signal last send in the same htop session. Closes: #862
This commit is contained in:

committed by
BenBE

parent
a38f48481e
commit
ff4f44b22a
5
Action.c
5
Action.c
@ -344,9 +344,12 @@ static Htop_Reaction actionKill(State* st) {
|
||||
if (Settings_isReadonly())
|
||||
return HTOP_OK;
|
||||
|
||||
Panel* signalsPanel = SignalsPanel_new();
|
||||
static int preSelectedSignal = SIGNALSPANEL_INITSELECTEDSIGNAL;
|
||||
|
||||
Panel* signalsPanel = SignalsPanel_new(preSelectedSignal);
|
||||
const ListItem* sgn = (ListItem*) Action_pickFromVector(st, signalsPanel, 14, true);
|
||||
if (sgn && sgn->key != 0) {
|
||||
preSelectedSignal = sgn->key;
|
||||
Panel_setHeader((Panel*)st->mainPanel, "Sending...");
|
||||
Panel_draw((Panel*)st->mainPanel, false, true, true, State_hideFunctionBar(st));
|
||||
refresh();
|
||||
|
Reference in New Issue
Block a user