1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 12:42:26 +01:00

keywords have higher priority than local files in :open

fixed <leader>S in noscript
This commit is contained in:
Martin Stubenschrott
2008-06-06 11:36:51 +00:00
parent f942ac4e35
commit f85e07c315
2 changed files with 7 additions and 2 deletions

4
NEWS
View File

@@ -1,4 +1,8 @@
<pre> <pre>
2008-06-xx:
* version 1.2
* keywords in :open <arg> have higher priority than local files now
2008-06-03: 2008-06-03:
* version 1.1 * version 1.1
* IMPORTANT: security update for suggest engines * IMPORTANT: security update for suggest engines

View File

@@ -285,9 +285,10 @@ liberator.util = { //{{{
// strip each 'URL' - makes things simpler later on // strip each 'URL' - makes things simpler later on
urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, ""); urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, "");
// first check if it is an existing local file // first check if it is an existing local file but NOT a search url/keyword
// NOTE: the test for being a file is done first, because it's faster than getSearchURL
var file = liberator.io.getFile(urls[url]); var file = liberator.io.getFile(urls[url]);
if (file.exists() && file.isReadable()) if (file.exists() && file.isReadable() && !liberator.bookmarks.getSearchURL("", urls[url]))
{ {
urls[url] = file.path; urls[url] = file.path;
continue; continue;