mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-17 21:37:27 -04:00
Make the kill feature works while in filtered mode
This commit is contained in:
@@ -418,7 +418,8 @@ class _GlancesCurses(object):
|
||||
self.args.cursor_position -= 1
|
||||
elif self.pressedkey == curses.KEY_DOWN or self.pressedkey == 66:
|
||||
# 'DOWN' > Down in the server list
|
||||
if self.args.cursor_position < glances_processes.max_processes - 2:
|
||||
# if self.args.cursor_position < glances_processes.max_processes - 2:
|
||||
if self.args.cursor_position < glances_processes.processes_count:
|
||||
self.args.cursor_position += 1
|
||||
elif self.pressedkey == ord('\x1b') or self.pressedkey == ord('q'):
|
||||
# 'ESC'|'q' > Quit
|
||||
|
||||
@@ -176,6 +176,11 @@ class GlancesProcesses(object):
|
||||
else:
|
||||
return None
|
||||
|
||||
@property
|
||||
def processes_count(self):
|
||||
"""Get the current number of processes showed in the UI."""
|
||||
return min(self._max_processes - 2, glances_processes.processcount['total'] - 1)
|
||||
|
||||
@property
|
||||
def max_processes(self):
|
||||
"""Get the maximum number of processes showed in the UI."""
|
||||
|
||||
Reference in New Issue
Block a user