diff --git a/ChangeLog b/ChangeLog index 2016686b..822e1d83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@
date: * version 0.5 + * madeetc. perform the default action, so menus kinda + work, and it doesn't beep anymore on tab. * added 'defsearch' setting for setting default search engine 2007-05-01: diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 7f2471cd..d7e5e8d7 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -1313,13 +1313,13 @@ function stringToURLs(str) }*/ // first check if the first word is a search engine - var matches = urls[url].match(/^\s*(\w+)\s*(.*)/); + var matches = urls[url].match(/^\s*(\w+)(\s+|$)(.*)/); var alias = null; var text = null; if (matches && matches[1]) alias = matches[1]; - if (matches && matches[2]) - text = matches[2]; + if (matches && matches[3] && matches[3].length >= 1) + text = matches[3]; if (alias) {