summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-24 23:39:12 +0200
committermathieui <mathieui@mathieui.net>2014-04-24 23:39:12 +0200
commit98914b8b0ab308c7a91ab859d597b24fdca8cb35 (patch)
tree0a306e24ec1c81f74d02fd105051e20e6178b01a
parent1bd9f78fe6ae8a7bac66dbcb91751c68f960809d (diff)
downloadpoezio-98914b8b0ab308c7a91ab859d597b24fdca8cb35.tar.gz
poezio-98914b8b0ab308c7a91ab859d597b24fdca8cb35.tar.bz2
poezio-98914b8b0ab308c7a91ab859d597b24fdca8cb35.tar.xz
poezio-98914b8b0ab308c7a91ab859d597b24fdca8cb35.zip
Fix a traceback when sorting a listwin
-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()