diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-09-22 19:47:59 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-09-22 19:47:59 -0700 |
| commit | 6e41b2f2e22bd41c243042616ddccd1dae3511b9 (patch) | |
| tree | 57f85a7b7d9cdf8036893e329a1bd701794a3d21 /bb.c | |
| parent | 7f8c16e5d957c9fd29bdcc1fae2e62371f7bd34a (diff) | |
Only toggle sort direction if it was the first sort and it was ~'d.
Diffstat (limited to 'bb.c')
| -rw-r--r-- | bb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -392,7 +392,7 @@ void set_sort(bb_t *bb, const char *sort) char *found; if ((found = strchr(bb->sort, s[1]))) { if (*s == '~') - *s = found[-1] == '+' ? '-' : '+'; + *s = found[-1] == '+' && found == &bb->sort[1] ? '-' : '+'; memmove(found-1, found+1, strlen(found+1)+1); } else if (*s == '~') *s = '+'; |
