diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-10-14 12:01:26 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-10-14 12:01:26 +0100 |
commit | eb57cbcc296b10d8d9ea41930ab402717c800f9c (patch) | |
tree | 6f6ad7c4bfb1abcba860ee51e9bc77ffef1bfc5a /input.c | |
parent | 7323ffeef22074911038444c0bfc675f56cd9726 (diff) | |
parent | b598bbcc2e8b26855e4d34dfff9c222c28080cd7 (diff) | |
download | rtmux-eb57cbcc296b10d8d9ea41930ab402717c800f9c.tar.gz rtmux-eb57cbcc296b10d8d9ea41930ab402717c800f9c.tar.bz2 rtmux-eb57cbcc296b10d8d9ea41930ab402717c800f9c.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2279,6 +2279,9 @@ input_enter_rename(struct input_ctx *ictx) static void input_exit_rename(struct input_ctx *ictx) { + struct window_pane *wp = ictx->wp; + struct options_entry *oe; + if (ictx->flags & INPUT_DISCARD) return; if (!options_get_number(ictx->wp->options, "allow-rename")) @@ -2287,6 +2290,13 @@ input_exit_rename(struct input_ctx *ictx) if (!utf8_isvalid(ictx->input_buf)) return; + + if (ictx->input_len == 0) { + oe = options_get(wp->window->options, "automatic-rename"); + if (oe != NULL) + options_remove(oe); + return; + } window_set_name(ictx->wp->window, ictx->input_buf); options_set_number(ictx->wp->window->options, "automatic-rename", 0); server_status_window(ictx->wp->window); |