Fix a traceback when sorting a listwin
This commit is contained in:
parent
1bd9f78fe6
commit
98914b8b0a
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue