From a1cbff161458bdc1d7cc90b0e27267dfe6ece069 Mon Sep 17 00:00:00 2001 From: dvkt Date: Fri, 27 Dec 2019 00:22:56 -0800 Subject: [PATCH] fix for selectors without leading / --- src/menu.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/menu.rs b/src/menu.rs index 671cd3e..9ca6cc1 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -650,7 +650,11 @@ impl Menu { } // selector if parts.len() > 1 { - url.push_str(parts[1]); + let mut sel = parts[1].to_string(); + if !sel.starts_with('/') { + sel.insert(0, '/'); + } + url.push_str(&sel); } lines.push(Line { name,