fvwmorg / fvwm3

FVWM version 3 -- the successor to fvwm2
Other
488 stars 75 forks source link

Empty argument prevents further arguments passed to function #1041

Open edanaher opened 3 days ago

edanaher commented 3 days ago

Upfront Information

Please provide the following information by running the command and providing the output.

fvwm3 1.0.9 (released)                                                          
with support for:  ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR, 
XRender, XCursor, XFT, NLS                           

NixOS unstable

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.