mirror of
https://github.com/tmux/tmux.git
synced 2025-11-03 00:06:07 +00:00
Merge branch 'obsd-master'
This commit is contained in:
15
format.c
15
format.c
@@ -4490,7 +4490,6 @@ format_cmp_window(const void *a0, const void *b0)
|
||||
|
||||
switch (sc->field) {
|
||||
case FORMAT_LOOP_BY_INDEX:
|
||||
result = wa->id - wb->id;
|
||||
break;
|
||||
case FORMAT_LOOP_BY_TIME:
|
||||
if (timercmp(&wa->activity_time, &wb->activity_time, >)) {
|
||||
@@ -4516,6 +4515,7 @@ format_cmp_window(const void *a0, const void *b0)
|
||||
static char *
|
||||
format_loop_windows(struct format_expand_state *es, const char *fmt)
|
||||
{
|
||||
struct format_loop_sort_criteria *sc = &format_loop_sort_criteria;
|
||||
struct format_tree *ft = es->ft;
|
||||
struct client *c = ft->client;
|
||||
struct cmdq_item *item = ft->item;
|
||||
@@ -4548,7 +4548,18 @@ format_loop_windows(struct format_expand_state *es, const char *fmt)
|
||||
l[n++] = wl;
|
||||
}
|
||||
|
||||
if (sc->field != FORMAT_LOOP_BY_INDEX)
|
||||
qsort(l, n, sizeof *l, format_cmp_window);
|
||||
else {
|
||||
/* Use order in the tree as index order. */
|
||||
if (sc->reversed) {
|
||||
for (i = 0; i < n / 2; i++) {
|
||||
wl = l[i];
|
||||
l[i] = l[n - 1 - i];
|
||||
l[n - 1 - i] = wl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
value = xcalloc(1, 1);
|
||||
valuelen = 1;
|
||||
@@ -4735,7 +4746,7 @@ format_loop_clients(struct format_expand_state *es, const char *fmt)
|
||||
if (sc->field != FORMAT_LOOP_BY_INDEX)
|
||||
qsort(l, n, sizeof *l, format_cmp_client);
|
||||
else {
|
||||
/* Use order in the TAILQ as "index" order. */
|
||||
/* Use order in the list as index order. */
|
||||
if (sc->reversed) {
|
||||
for (i = 0; i < n / 2; i++) {
|
||||
c = l[i];
|
||||
|
||||
8
tmux.h
8
tmux.h
@@ -1563,13 +1563,15 @@ struct tty {
|
||||
#define TTY_OPENED 0x20
|
||||
#define TTY_OSC52QUERY 0x40
|
||||
#define TTY_BLOCK 0x80
|
||||
#define TTY_HAVEDA 0x100 /* Primary DA. */
|
||||
#define TTY_HAVEDA 0x100
|
||||
#define TTY_HAVEXDA 0x200
|
||||
#define TTY_SYNCING 0x400
|
||||
#define TTY_HAVEDA2 0x800 /* Secondary DA. */
|
||||
#define TTY_HAVEDA2 0x800
|
||||
#define TTY_WINSIZEQUERY 0x1000
|
||||
#define TTY_HAVEFG 0x2000
|
||||
#define TTY_HAVEBG 0x4000
|
||||
#define TTY_ALL_REQUEST_FLAGS \
|
||||
(TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA)
|
||||
(TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA|TTY_HAVEFG|TTY_HAVEBG)
|
||||
int flags;
|
||||
|
||||
struct tty_term *term;
|
||||
|
||||
@@ -938,7 +938,7 @@ partial_key:
|
||||
if (delay == 0)
|
||||
delay = 1;
|
||||
if ((tty->flags & TTY_ALL_REQUEST_FLAGS) != TTY_ALL_REQUEST_FLAGS) {
|
||||
log_debug("%s: increasing delay for active DA query", c->name);
|
||||
log_debug("%s: increasing delay for active query", c->name);
|
||||
if (delay < 500)
|
||||
delay = 500;
|
||||
}
|
||||
@@ -1682,12 +1682,14 @@ tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size,
|
||||
else
|
||||
log_debug("fg is %s", colour_tostring(n));
|
||||
*fg = n;
|
||||
tty->flags |= TTY_HAVEFG;
|
||||
} else if (n != -1) {
|
||||
if (c != NULL)
|
||||
log_debug("%s bg is %s", c->name, colour_tostring(n));
|
||||
else
|
||||
log_debug("bg is %s", colour_tostring(n));
|
||||
*bg = n;
|
||||
tty->flags |= TTY_HAVEBG;
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user