mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 00:02:27 +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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user