Make Action_pickFromVector code match header prototype

Noticed by BenBE in review of #1243
portage
Nathan Scott 3 years ago
parent a393066ce8
commit 1de7a2b6e3
  1. 8
      Action.c

@ -43,7 +43,7 @@ in the source distribution for its full text.
#endif #endif
Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) { Object* Action_pickFromVector(State* st, Panel* list, int x, bool follow) {
MainPanel* mainPanel = st->mainPanel; MainPanel* mainPanel = st->mainPanel;
Header* header = st->header; Header* header = st->header;
Machine* host = st->host; Machine* host = st->host;
@ -56,8 +56,8 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess)
Panel* panelFocus; Panel* panelFocus;
int ch; int ch;
bool unfollow = false; bool unfollow = false;
int pid = followProcess ? MainPanel_selectedPid(mainPanel) : -1; int pid = follow ? MainPanel_selectedPid(mainPanel) : -1;
if (followProcess && host->pl->following == -1) { if (follow && host->pl->following == -1) {
host->pl->following = pid; host->pl->following = pid;
unfollow = true; unfollow = true;
} }
@ -69,7 +69,7 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess)
Panel_move((Panel*)mainPanel, 0, y); Panel_move((Panel*)mainPanel, 0, y);
Panel_resize((Panel*)mainPanel, COLS, LINES - y - 1); Panel_resize((Panel*)mainPanel, COLS, LINES - y - 1);
if (panelFocus == list && ch == 13) { if (panelFocus == list && ch == 13) {
if (followProcess) { if (follow) {
const Process* selected = (const Process*)Panel_getSelected((Panel*)mainPanel); const Process* selected = (const Process*)Panel_getSelected((Panel*)mainPanel);
if (selected && selected->pid == pid) if (selected && selected->pid == pid)
return Panel_getSelected(list); return Panel_getSelected(list);

Loading…
Cancel
Save