warn about \w no arg
This commit is contained in:
parent
14b4a4702c
commit
d0648192ab
1 changed files with 6 additions and 1 deletions
|
|
@ -72,8 +72,13 @@ e_w(void)
|
|||
{
|
||||
Rune *a;
|
||||
Rune buf[40];
|
||||
|
||||
static Rune zero;
|
||||
|
||||
a = getqarg();
|
||||
if(a == nil){
|
||||
warn("no arg for \\w");
|
||||
a = &zero;
|
||||
}
|
||||
runesnprint(buf, sizeof buf, "%ld", runestrlen(a));
|
||||
pushinputstring(buf);
|
||||
nr(L("st"), 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue