mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 17:57:58 +01:00
Fix ":abbr this'is'a'test" to return an error, like Vim.
Also note in map.txt that :abbr LHS cannot contain quotes or spaces.
This commit is contained in:
@@ -164,7 +164,7 @@ function Editor() //{{{
|
||||
"Abbreviate a key sequence" + modeDescription,
|
||||
function (args)
|
||||
{
|
||||
let matches = args.string.match(/^([^\s"']*)\s*(.*)/);
|
||||
let matches = args.string.match(/^\s*([^\s"']*)(?:\s*$|\s+(.*))/);
|
||||
if (! matches)
|
||||
{
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
|
||||
@@ -179,7 +179,8 @@ section:Abbreviations[abbreviations]
|
||||
________________________________________________________________________________
|
||||
Abbreviate a key sequence. Abbreviate {lhs} to {rhs}. If only {lhs} is given,
|
||||
list all abbreviations that start with {lhs}. List all abbreviations, if no
|
||||
arguments are given.
|
||||
arguments are given. To prevent ambiguity, the {lhs} cannot contain
|
||||
quotes (' or ") or spaces.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user