Skip to content

Commit

Permalink
Merge branch 'master' into sixel
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Feb 20, 2020
2 parents a282439 + 4694afb commit 90dc051
Show file tree
Hide file tree
Showing 18 changed files with 237 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Before opening an issue, please ensure that:
- Your question or issue is not covered [in the
manual](https://man.openbsd.org/tmux.1) (run `man tmux`).

- Your problem is not mentioned in the [CHANGES
file](https://raw.githubusercontent.com/tmux/tmux/master/CHANGES) file.
- Your problem is not mentioned in [the CHANGES
file](https://raw.githubusercontent.com/tmux/tmux/master/CHANGES).

- Nobody else has opened the same issue recently.

Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: nicm
liberapay: tmux
10 changes: 10 additions & 0 deletions .github/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
daysUntilLock: 180
skipCreatedBefore: false
exemptLabels: []
lockLabel: false
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
setLockReason: false
#only: issues
58 changes: 18 additions & 40 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CHANGES FROM 3.0 to X.X
CHANGES FROM 3.1 TO 3.2

XXX

CHANGES FROM 3.0a to 3.1

* Add support for adding a note to a key binding (with bind-key -N) and use
this to add descriptions to the default key bindings. A new -N flag to
Expand All @@ -10,7 +14,7 @@ CHANGES FROM 3.0 to X.X
* Add support for the iTerm2 DSR 1337 sequence to get the terminal version.

* Treat plausible but invalid keys (like C-BSpace) as literal like any other
unrecognised string passed to send-keys
unrecognised string passed to send-keys.

* Detect iTerm2 and enable use of DECSLRM (much faster with horizontally split
windows).
Expand Down Expand Up @@ -42,44 +46,16 @@ CHANGES FROM 3.0 to X.X

* Add push-default to status-left and status-right in status-format[0].

* Add -F flag to send-keys to expand formats in search-backward and forward
copy mode commands and copy_cursor_word and copy_cursor_line formats for word
and line at cursor in copy mode. Use for default # and * binding with vi(1)
keys.

* Do not clear search marks on cursor movement with vi(1) keys.

* Add p format modifier for padding to width and allow multiple substitutions
in a single format.

* Add -f for full size to join-pane (like split-window).

* Handle OSC 7 (a VTE extension) and put the result in a new format (pane_path).

* Change new-session -A without a session name (that is, no -s option also) to
attach to the best existing session like attach-session rather than creating
a new one.

* Add an option to set the key sent by backspace for those whose system uses ^H
rather than ^?.

* Add formats for cursor and selection position in copy mode.

* Add support for percentage sizes for resize-pane ("-x 10%"). Also change
split-window and join-pane -l to accept similar percentages and no longer
document -p.

* Turn automatic-rename back on if the rename escape sequence is used with an
empty name.

* Make select-pane -P set window-active-style also to match previous behaviour.

* Do not use bright when emulating 256 colours on an 8 colour terminal because
it is also bold on some terminals.

* Add a "latest" window-size option which tries to size windows based on the
most recently used client. This is now the default.

* Make select-pane -P set window-active-style also to match previous behaviour.

* Do not truncate list-keys output.
Expand All @@ -92,17 +68,18 @@ CHANGES FROM 3.0 to X.X
-p flag.

* Add -F flag to send-keys to expand formats in search-backward and forward
copy mode commands, this makes it easier to use the cursor_word and
cursor_line formats.
copy mode commands and copy_cursor_word and copy_cursor_line formats for word
and line at cursor in copy mode. Use for default # and * binding with vi(1)
keys.

* Add formats for word and line at cursor position in copy mode.

* Add formats for cursor and selection position in copy mode
* Add formats for cursor and selection position in copy mode.

* Support all the forms of RGB colour strings in OSC sequences rather than
requiring two digits.

* Limit lazy resize to panes in attached sessions only
* Limit lazy resize to panes in attached sessions only.

* Add an option to set the key sent by backspace for those whose system uses ^H
rather than ^?.
Expand All @@ -111,7 +88,8 @@ CHANGES FROM 3.0 to X.X
attach to the best existing session like attach-session rather than a new
one.

* Change window-size default from smallest to latest.
* Add a "latest" window-size option which tries to size windows based on the
most recently used client. This is now the default.

* Add simple support for OSC 7 (result is available in the pane_path format).

Expand All @@ -133,7 +111,7 @@ CHANGES FROM 3.0 to X.X

* Add reverse sorting in tree, client and buffer modes.

CHANGES FROM 3.0 to 3.0a
CHANGES FROM 3.0 TO 3.0a

* Do not require REG_STARTEND.

Expand All @@ -147,7 +125,7 @@ CHANGES FROM 3.0 to 3.0a

* Do not crash when restoring a layout with only one pane.

CHANGES FROM 2.9 to 3.0
CHANGES FROM 2.9 TO 3.0

* Workaround invalid layout strings generated by older tmux versions and add
some additional sanity checks
Expand Down Expand Up @@ -272,11 +250,11 @@ CHANGES FROM 2.9 to 3.0
* Add the ability to infer an option type (server, session, window) from its
name to show-options (it was already present in set-option).

CHANGES FROM 2.9 to 2.9a
CHANGES FROM 2.9 TO 2.9a

* Fix bugs in select-pane and the main-horizontal and main-vertical layouts.

CHANGES FROM 2.8 to 2.9
CHANGES FROM 2.8 TO 2.9

* Attempt to preserve horizontal cursor position as well as vertical with
reflow.
Expand Down Expand Up @@ -401,7 +379,7 @@ CHANGES FROM 2.8 to 2.9
moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

CHANGES FROM 2.7 to 2.8
CHANGES FROM 2.7 TO 2.8

* Make display-panes block the client until a pane is chosen or it
times out.
Expand Down
4 changes: 2 additions & 2 deletions cmd-bind-key.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const struct cmd_entry cmd_bind_key_entry = {
.name = "bind-key",
.alias = "bind",

.args = { "cnrN:T:", 2, -1 },
.usage = "[-cnr] [-T key-table] [-N note] key "
.args = { "nrN:T:", 2, -1 },
.usage = "[-nr] [-T key-table] [-N note] key "
"command [arguments]",

.flags = CMD_AFTERHOOK,
Expand Down
17 changes: 11 additions & 6 deletions cmd-list-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const struct cmd_entry cmd_list_keys_entry = {
.name = "list-keys",
.alias = "lsk",

.args = { "1NP:T:", 0, 1 },
.usage = "[-1N] [-P prefix-string] [-T key-table] [key]",
.args = { "1aNP:T:", 0, 1 },
.usage = "[-1aN] [-P prefix-string] [-T key-table] [key]",

.flags = CMD_STARTSERVER|CMD_AFTERHOOK,
.exec = cmd_list_keys_exec
Expand Down Expand Up @@ -89,7 +89,7 @@ cmd_list_keys_print_notes(struct cmdq_item *item, struct args *args,
struct key_table *table;
struct key_binding *bd;
const char *key;
char *tmp;
char *tmp, *note;
int found = 0;

table = key_bindings_get_table(tablename, 0);
Expand All @@ -99,19 +99,24 @@ cmd_list_keys_print_notes(struct cmdq_item *item, struct args *args,
while (bd != NULL) {
if ((only != KEYC_UNKNOWN && bd->key != only) ||
KEYC_IS_MOUSE(bd->key) ||
bd->note == NULL) {
(bd->note == NULL && !args_has(args, 'a'))) {
bd = key_bindings_next(table, bd);
continue;
}
found = 1;
key = key_string_lookup_key(bd->key);

if (bd->note == NULL)
note = cmd_list_print(bd->cmdlist, 1);
else
note = xstrdup(bd->note);
tmp = utf8_padcstr(key, keywidth + 1);
if (args_has(args, '1') && c != NULL)
status_message_set(c, "%s%s%s", prefix, tmp, bd->note);
status_message_set(c, "%s%s%s", prefix, tmp, note);
else
cmdq_print(item, "%s%s%s", prefix, tmp, bd->note);
cmdq_print(item, "%s%s%s", prefix, tmp, note);
free(tmp);
free(note);

if (args_has(args, '1'))
break;
Expand Down
4 changes: 2 additions & 2 deletions cmd-select-pane.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(self->args, 'T')) {
pane_title = format_single(item, args_get(self->args, 'T'),
c, s, wl, wp);
screen_set_title(&wp->base, pane_title);
server_status_window(wp->window);
if (screen_set_title(&wp->base, pane_title))
server_status_window(wp->window);
free(pane_title);
return (CMD_RETURN_NORMAL);
}
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# configure.ac

AC_INIT([tmux], next-3.1)
AC_INIT([tmux], next-3.2)
AC_PREREQ([2.60])

AC_CONFIG_AUX_DIR(etc)
Expand Down
42 changes: 40 additions & 2 deletions format.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,44 @@ format_cb_pane_in_mode(struct format_tree *ft, struct format_entry *fe)
xasprintf(&fe->value, "%u", n);
}

/* Callback for pane_at_top. */
static void
format_cb_pane_at_top(struct format_tree *ft, struct format_entry *fe)
{
struct window_pane *wp = ft->wp;
struct window *w = wp->window;
int status, flag;

if (wp == NULL)
return;

status = options_get_number(w->options, "pane-border-status");
if (status == PANE_STATUS_TOP)
flag = (wp->yoff == 1);
else
flag = (wp->yoff == 0);
xasprintf(&fe->value, "%d", flag);
}

/* Callback for pane_at_bottom. */
static void
format_cb_pane_at_bottom(struct format_tree *ft, struct format_entry *fe)
{
struct window_pane *wp = ft->wp;
struct window *w = wp->window;
int status, flag;

if (wp == NULL)
return;

status = options_get_number(w->options, "pane-border-status");
if (status == PANE_STATUS_BOTTOM)
flag = (wp->yoff + wp->sy == w->sy - 1);
else
flag = (wp->yoff + wp->sy == w->sy);
xasprintf(&fe->value, "%d", flag);
}

/* Callback for cursor_character. */
static void
format_cb_cursor_character(struct format_tree *ft, struct format_entry *fe)
Expand Down Expand Up @@ -2546,9 +2584,9 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_right", "%u", wp->xoff + wp->sx - 1);
format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1);
format_add(ft, "pane_at_left", "%d", wp->xoff == 0);
format_add(ft, "pane_at_top", "%d", wp->yoff == 0);
format_add_cb(ft, "pane_at_top", format_cb_pane_at_top);
format_add(ft, "pane_at_right", "%d", wp->xoff + wp->sx == w->sx);
format_add(ft, "pane_at_bottom", "%d", wp->yoff + wp->sy == w->sy);
format_add_cb(ft, "pane_at_bottom", format_cb_pane_at_bottom);

wme = TAILQ_FIRST(&wp->modes);
if (wme != NULL) {
Expand Down
10 changes: 3 additions & 7 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,10 +2225,8 @@ input_exit_osc(struct input_ctx *ictx)
switch (option) {
case 0:
case 2:
if (utf8_isvalid(p)) {
screen_set_title(sctx->s, p);
if (screen_set_title(sctx->s, p))
server_status_window(ictx->wp->window);
}
break;
case 4:
input_osc_4(ictx, p);
Expand Down Expand Up @@ -2286,10 +2284,8 @@ input_exit_apc(struct input_ctx *ictx)
return;
log_debug("%s: \"%s\"", __func__, ictx->input_buf);

if (!utf8_isvalid(ictx->input_buf))
return;
screen_set_title(sctx->s, ictx->input_buf);
server_status_window(ictx->wp->window);
if (screen_set_title(sctx->s, ictx->input_buf))
server_status_window(ictx->wp->window);
}

/* Rename string started. */
Expand Down
Loading

0 comments on commit 90dc051

Please sign in to comment.