From 94d06bc7270e57598d0cdae2f669ad62ef93c637 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:34:01 -0400 Subject: [PATCH] options/m_option: allow /WS geometry parameter usable without XYWH This allows specifying workspace while using autofit for window size or leave it as default instead of mandatory geometry in pixels. --- options/m_option.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/options/m_option.c b/options/m_option.c index 6ddc0a7230..e30e9ca6ee 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2220,13 +2220,15 @@ static bool parse_geometry_str(struct m_geometry *gm, bstr s) if (bstrchr(s, ':') < 0) { gm->wh_valid = true; - if (!bstr_startswith0(s, "+") && !bstr_startswith0(s, "-")) { + if (!bstr_startswith0(s, "+") && !bstr_startswith0(s, "-") && + !bstr_startswith0(s, "/")) + { if (!bstr_startswith0(s, "x")) READ_NUM(w, w_per); if (bstr_eatstart0(&s, "x")) READ_NUM(h, h_per); } - if (s.len > 0) { + if (s.len > 0 && !bstr_startswith0(s, "/")) { gm->xy_valid = true; READ_SIGN(x_sign); READ_NUM(x, x_per);