From a2c0233fc0b96b6a1612d881c2c70ce719c46815 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 16 Jan 2009 14:59:36 -0500 Subject: [PATCH] After some investigation, it appears like Vim only outlaws quotes in :abbr. TODO: Make :abbr abcd\ efgh work like Vim (i.e., map abcd\ to efgh). That's a bigger change to how the command line is parsed. --- common/content/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/editor.js b/common/content/editor.js index 307a7ac3..25159808 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -165,7 +165,7 @@ function Editor() //{{{ function (args) { let [lhs, rhs] = args; - if (lhs && lhs.match(/\W/)) + if (lhs && lhs.match(/[\s"']/)) { liberator.echoerr("E474: Invalid argument"); return false; @@ -1015,7 +1015,7 @@ function Editor() //{{{ let text = textbox.value; let currStart = textbox.selectionStart; let currEnd = textbox.selectionEnd; - let foundWord = text.substring(0, currStart).replace(/^(.|\n)*?(\w+)$/m, "$2"); // get last word \b word boundary + let foundWord = text.substring(0, currStart).replace(/^(.|\n)*?([^\s"']+)$/m, "$2"); // get last word \b word boundary if (!foundWord) return true;