mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:57:58 +01:00
Moved :abbr LHS non-word match to outside RHS check. Want to check LHS always (like Vim).
This commit is contained in:
@@ -165,16 +165,13 @@ function Editor() //{{{
|
||||
function (args)
|
||||
{
|
||||
let [lhs, rhs] = args;
|
||||
if (rhs)
|
||||
if (lhs.match(/\W/))
|
||||
{
|
||||
if (lhs.match(/\W/))
|
||||
{
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
return false;
|
||||
}
|
||||
|
||||
editor.addAbbreviation(mode, lhs, rhs);
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
return false;
|
||||
}
|
||||
if (rhs)
|
||||
editor.addAbbreviation(mode, lhs, rhs);
|
||||
else
|
||||
editor.listAbbreviations(mode, lhs || "");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user