mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:07:59 +01:00
Make sure LHS of :abbr is is all word characters. E474 otherwise (mimic Vim).
This commit is contained in:
@@ -166,7 +166,15 @@ function Editor() //{{{
|
||||
{
|
||||
let [lhs, rhs] = args;
|
||||
if (rhs)
|
||||
{
|
||||
if (lhs.match(/\W/))
|
||||
{
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
return false;
|
||||
}
|
||||
|
||||
editor.addAbbreviation(mode, lhs, rhs);
|
||||
}
|
||||
else
|
||||
editor.listAbbreviations(mode, lhs || "");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user