diff options
author | Kazuo Teramoto <kaz.rag@gmail.com> | 2012-07-25 13:16:55 -0300 |
---|---|---|
committer | Kazuo Teramoto <kaz.rag@gmail.com> | 2012-07-25 13:16:55 -0300 |
commit | 49043c46a03724b00fa673e2250eb8dd27c2891a (patch) | |
tree | e8cee66529b8eb27a12d937df2f163dc0f555baf | |
parent | 2d47963053378cac1508beda8a87929efd7b670f (diff) |
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.
-rw-r--r-- | alot/helper.py | 2 |
1 files changed, 1 insertions, 1 deletions
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()) |