mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Merge branch 'obsd-master'
This commit is contained in:
11
sort.c
11
sort.c
@@ -65,7 +65,12 @@ sort_buffer_cmp(const void *a0, const void *b0)
|
|||||||
result = strcmp(pa->name, pb->name);
|
result = strcmp(pa->name, pb->name);
|
||||||
break;
|
break;
|
||||||
case SORT_CREATION:
|
case SORT_CREATION:
|
||||||
result = pa->order - pb->order;
|
if (pa->order > pb->order)
|
||||||
|
result = -1;
|
||||||
|
else if (pa->order < pb->order)
|
||||||
|
result = 1;
|
||||||
|
else
|
||||||
|
result = 0;
|
||||||
break;
|
break;
|
||||||
case SORT_SIZE:
|
case SORT_SIZE:
|
||||||
result = pa->size - pb->size;
|
result = pa->size - pb->size;
|
||||||
@@ -251,11 +256,11 @@ sort_winlink_cmp(const void *a0, const void *b0)
|
|||||||
break;
|
break;
|
||||||
case SORT_CREATION:
|
case SORT_CREATION:
|
||||||
if (timercmp(&wa->creation_time, &wb->creation_time, >)) {
|
if (timercmp(&wa->creation_time, &wb->creation_time, >)) {
|
||||||
result = -1;
|
result = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (timercmp(&wa->creation_time, &wb->creation_time, <)) {
|
if (timercmp(&wa->creation_time, &wb->creation_time, <)) {
|
||||||
result = 1;
|
result = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user