aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-10-30 14:01:20 +0000
committerThomas Adam <thomas@xteddy.org>2020-10-30 14:01:20 +0000
commitd0640609044c06ffa5aeb7a509965ce3f0b1a412 (patch)
tree81f337a88897a8dd7e7f5a9913ee926f7e764318
parent0b8ae4de5c38210d9a3ac6d003726f7cab89f285 (diff)
parent9726c4454e29cb5b9c6681abfb5c99972a9bd574 (diff)
downloadrtmux-d0640609044c06ffa5aeb7a509965ce3f0b1a412.tar.gz
rtmux-d0640609044c06ffa5aeb7a509965ce3f0b1a412.tar.bz2
rtmux-d0640609044c06ffa5aeb7a509965ce3f0b1a412.zip
Merge branch 'obsd-master'
-rw-r--r--input.c4
-rw-r--r--menu.c7
-rw-r--r--screen.c2
3 files changed, 10 insertions, 3 deletions
diff --git a/input.c b/input.c
index c280c0d9..8b7ba08a 100644
--- a/input.c
+++ b/input.c
@@ -1545,6 +1545,10 @@ input_csi_dispatch(struct input_ctx *ictx)
if (n == -1)
break;
+ m = screen_size_x(s) - s->cx;
+ if (n > m)
+ n = m;
+
if (ictx->last == -1)
break;
ictx->ch = ictx->last;
diff --git a/menu.c b/menu.c
index 3bd56ab1..48c9ed2f 100644
--- a/menu.c
+++ b/menu.c
@@ -315,10 +315,11 @@ chosen:
if (md->choice == -1)
return (1);
item = &menu->items[md->choice];
- if ((md->flags & MENU_STAYOPEN) && item->name == NULL)
- return (0);
- if (item->name == NULL || *item->name == '-')
+ if (item->name == NULL || *item->name == '-') {
+ if (md->flags & MENU_STAYOPEN)
+ return (0);
return (1);
+ }
if (md->cb != NULL) {
md->cb(md->menu, md->choice, item->key, md->data);
md->cb = NULL;
diff --git a/screen.c b/screen.c
index 95299306..b55c9f87 100644
--- a/screen.c
+++ b/screen.c
@@ -78,6 +78,7 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
s->title = xstrdup("");
s->titles = NULL;
+ s->path = NULL;
s->cstyle = 0;
s->ccolour = xstrdup("");
@@ -120,6 +121,7 @@ screen_free(struct screen *s)
{
free(s->sel);
free(s->tabs);
+ free(s->path);
free(s->title);
free(s->ccolour);