1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 11:47: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:
Ted Pavlic
2009-01-16 15:33:43 -05:00
parent 22d3bc470b
commit ba948246cc
2 changed files with 3 additions and 2 deletions

View File

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