From 6901119378172148787c4db070357439d7474916 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 3 Sep 2023 19:34:20 +1000 Subject: [PATCH] menu: disable shift as well as wrap. As 'popup' sets render-wrap, we must set to later in the stack for it to take effect. We need text not to shift at all, or we get problems with cursor at the end of right-aligned text. Signed-off-by: NeilBrown --- lib-menu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib-menu.c b/lib-menu.c index a082c197..98a1adfc 100644 --- a/lib-menu.c +++ b/lib-menu.c @@ -122,7 +122,6 @@ DEF_CMD(menu_attach) return Efail; call("doc:set:autoclose", docp, 1); attr_set_str(&docp->attrs, "render-simple", "format"); - attr_set_int(&docp->attrs, "render-wrap", 0); attr_set_str(&docp->attrs, "heading", ""); if (ci->num & 1) /* show the 'action' - presumably a key name */ @@ -144,8 +143,10 @@ DEF_CMD(menu_attach) return Efail; } p2 = pane_register(p2, 0, &menu_handle.c); + /* Don't allow any shift - we size the menu to fit */ if (!p2) return Efail; + attr_set_int(&p2->attrs, "render-wrap", 0); call("Mouse-grab", p2); return comm_call(ci->comm2, "cb:attach", p2); } -- 2.39.5