]> git.neil.brown.name Git - edlib.git/commitdiff
lib-menu: prohibit left-shift of display.
authorNeilBrown <neil@brown.name>
Tue, 18 Jul 2023 10:55:12 +0000 (20:55 +1000)
committerNeilBrown <neil@brown.name>
Tue, 18 Jul 2023 11:51:36 +0000 (21:51 +1000)
As the menu window is sized to match the longest line, there is a risk
of a left-shift happening if the cursor ever ends up at the end of that
line.
That would be bad, so explicitly disable left-shift.

Signed-off-by: NeilBrown <neil@brown.name>
lib-menu.c

index 4961383578339c7ad17580b34b6e443b45051709..d1016e3e0d2a6c71f570466f700a5bd753dd4e23 100644 (file)
@@ -89,6 +89,7 @@ DEF_CMD(menu_attach)
                return Efail;
        call("doc:set:autoclose", docp, 1);
        attr_set_str(&docp->attrs, "render-simple", "format");
+       attr_set_str(&docp->attrs, "shift-left", "0");
        attr_set_str(&docp->attrs, "heading", "");
        attr_set_str(&docp->attrs, "line-format", "<action-activate:menu-select>%name</>");
        attr_set_str(&docp->attrs, "done-key", ci->str2 ?: "menu-done");