warn about \w no arg
This commit is contained in:
parent
14b4a4702c
commit
d0648192ab
@ -72,8 +72,13 @@ e_w(void)
|
|||||||
{
|
{
|
||||||
Rune *a;
|
Rune *a;
|
||||||
Rune buf[40];
|
Rune buf[40];
|
||||||
|
static Rune zero;
|
||||||
|
|
||||||
a = getqarg();
|
a = getqarg();
|
||||||
|
if(a == nil){
|
||||||
|
warn("no arg for \\w");
|
||||||
|
a = &zero;
|
||||||
|
}
|
||||||
runesnprint(buf, sizeof buf, "%ld", runestrlen(a));
|
runesnprint(buf, sizeof buf, "%ld", runestrlen(a));
|
||||||
pushinputstring(buf);
|
pushinputstring(buf);
|
||||||
nr(L("st"), 0);
|
nr(L("st"), 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user