summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/windows.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/windows.py b/src/windows.py
index 05c073e0..3b45aae1 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -2324,9 +2324,10 @@ class ListWin(Win):
if not col_name:
return
elif asc:
- self.lines.sort(key=lambda x: x[col_name])
+ self.lines.sort(key=lambda x: x[self._columns[col_name]])
else:
- self.lines.sort(key=lambda x: x[col_name], reverse=True)
+ self.lines.sort(key=lambda x: x[self._columns[col_name]],
+ reverse=True)
self.refresh()
curses.doupdate()