Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty argument prevents further arguments passed to function #1041

Open
edanaher opened this issue Jul 4, 2024 · 1 comment
Open

Empty argument prevents further arguments passed to function #1041

edanaher opened this issue Jul 4, 2024 · 1 comment
Assignees
Labels
relates:functions Issues is in function code type:bug Something's broken!
Milestone

Comments

@edanaher
Copy link

edanaher commented Jul 4, 2024

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 edanaher added the type:bug Something's broken! label Jul 4, 2024
@ThomasAdam ThomasAdam added the relates:functions Issues is in function code label Jul 4, 2024
@ThomasAdam ThomasAdam self-assigned this Jul 4, 2024
@ThomasAdam ThomasAdam added this to the 1.1.1 milestone Jul 4, 2024
@somiaj
Copy link
Collaborator

somiaj commented Oct 20, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates:functions Issues is in function code type:bug Something's broken!
Projects
Status: To do
Development

No branches or pull requests

3 participants