Commit 40b917a9 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Correct reversal of sort order in MRU list.

parent 1eb6940c
......@@ -1137,16 +1137,18 @@ class ControlSession:
if "sort" in variables:
sorter = variables["sort"]
del variables["sort"]
# Earliest elements in a span get displayed first, so these
# sorts are all sign-reversed from what you might expect.
# FIXME: implement sorting by address, in case anyone cares
sortdict = {
"lstint" : lambda e: e.last, # lstint ascending
"-lstint" : lambda e: -e.last, # lstint descending
"avgint" : lambda e: e.avgint(), # avgint ascending
"-avgint" : lambda e: -e.avgint(), # avgint descending
"lstint" : lambda e: -e.last, # lstint ascending
"-lstint" : lambda e: e.last, # lstint descending
"avgint" : lambda e: -e.avgint(), # avgint ascending
"-avgint" : lambda e: e.avgint(), # avgint descending
"addr" : None, # IPv4 asc. then IPv6 asc.
"-addr" : None, # IPv6 desc. then IPv4 desc.
"count" : lambda e: e.ct, # hit count ascending
"-count": lambda e: -e.ct, # hit count descending
"count" : lambda e: -e.ct, # hit count ascending
"-count": lambda e: e.ct, # hit count descending
if sorter == "listint":
sorter = None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment