From 49043c46a03724b00fa673e2250eb8dd27c2891a Mon Sep 17 00:00:00 2001 From: Kazuo Teramoto Date: Wed, 25 Jul 2012 13:16:55 -0300 Subject: Fix the sorting of tags with length == 1 The tag sorting `cmp()` put single unicode tags before the long tag names, but don't sort the single length tags. This commit fix this behavior sorting the single length tags separately. --- alot/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alot/helper.py b/alot/helper.py index 78744edf..3e5e9dce 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -418,7 +418,7 @@ def tag_cmp(a, b): Sorting tags using this function puts all tags of length 1 at the beginning. This groups all tags mapped to unicode characters. ''' - if min(len(a), len(b)) == 1: + if min(len(a), len(b)) == 1 and max(len(a), len(b)) > 1: return cmp(len(a), len(b)) else: return cmp(a.lower(), b.lower()) -- cgit v1.2.3