mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 17:12:28 +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)
|
function (args)
|
||||||
{
|
{
|
||||||
let [lhs, rhs] = args;
|
let [lhs, rhs] = args;
|
||||||
if (rhs)
|
if (lhs.match(/\W/))
|
||||||
{
|
{
|
||||||
if (lhs.match(/\W/))
|
liberator.echoerr("E474: Invalid argument");
|
||||||
{
|
return false;
|
||||||
liberator.echoerr("E474: Invalid argument");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
editor.addAbbreviation(mode, lhs, rhs);
|
|
||||||
}
|
}
|
||||||
|
if (rhs)
|
||||||
|
editor.addAbbreviation(mode, lhs, rhs);
|
||||||
else
|
else
|
||||||
editor.listAbbreviations(mode, lhs || "");
|
editor.listAbbreviations(mode, lhs || "");
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user