aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);