Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2020-10-30 14:01:20 +00:00
commit d064060904
3 changed files with 10 additions and 3 deletions

View File

@ -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;

7
menu.c
View File

@ -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;

View File

@ -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);