Empty argument prevents further arguments passed to function
Opened this issue · 1 comments
Upfront Information
Please provide the following information by running the command and providing
the output.
- Fvwm3 version (run:
fvwm3 --version
)
fvwm3 1.0.9 (released)
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR,
XRender, XCursor, XFT, NLS
- Linux distribution or BSD name/version
NixOS unstable
- Platform (run:
uname -sp
)
Linux unknown
Expected Behaviour
When parsing arguments, and empty string should be passed in as an argument. E.g., the following should product a binding for raising a window on alt-click, and moving if the mouse is then dragged:
AddToFunc MapMouse
+ I AddToFunc EvanMouse$0$1$2
+ I + I $3
+ I + C $4
+ I + D $5
+ I + M $6
+ I + H $7
+ I Mouse $0 $1 $2 EvanMouse$0$1$2
MapMouse 1 W M Raise '' Lower Move Move
Or the following should echo A..B.C
on startup:
AddToFunc EchoArgs
+ I Exec echo $0.$1.$2.$3
EchoArgs A '' B C
Indeed, this is the behavior in fvwm2.
Actual Behaviour
In the first case, only the first binding occurs; in the second, the output is A...
It looks like when an empty argument is provided, the remaining arguments are ignored. In my case, I can work around this by replacing the empty string with a single space, which seems to have the same behavior. But the readme still says "An existing version 2 configuration currently works"; this violates that statement.
Steps to Reproduce
The config files provided above are pretty minimal, and as noted, fvwm2 behaves as expected.
@edanaher Although not a fix for this issue in general, fvwm's Nop
command is essentially a place keeper for do nothing. The example you gave there should work with MapMouse 1 W M Raise Nop Lower Move Move
. Also in your case + C
without any options could also cause problems, while + C Nop
would just do nothing.