From: Daniel Carl Date: Wed, 1 May 2013 09:54:09 +0000 (+0200) Subject: Check also for shortcut URIs if path contains '.'. X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png/assets/lich_lifts_title_slice.png/git?a=commitdiff_plain;h=1b6f9b5500c260d4e39e06c7a2e40b66aaf6bb00;p=vimb.git Check also for shortcut URIs if path contains '.'. The shortcut URIs where only checked if the given path variable contained no dot. This made it impossible to easily search via shortcut URI for params like 'document.activeElement'. This patch lookup the shortcut URIs also if the given path contains spaces, to avoid this misbehaviour. --- diff --git a/src/main.c b/src/main.c index 892ab26..dfbdf69 100644 --- a/src/main.c +++ b/src/main.c @@ -143,8 +143,8 @@ gboolean vb_load_uri(const Arg *arg) rp = realpath(path, NULL); uri = g_strdup_printf("file://%s", rp); free(rp); - } else if (!strchr(path, '.')) { - /* use a shortcut */ + } else if (strchr(path, ' ') || !strchr(path, '.')) { + /* use a shortcut if path contains spaces or no dot */ uri = shortcut_get_uri(path); }