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

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.
This commit is contained in:
Ted Pavlic
2009-01-16 14:59:36 -05:00
parent aca074f82b
commit a2c0233fc0

View File

@@ -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;