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

string.gmatch expects LayoutMap string to end with delimiter #1

Closed
zeb139 opened this issue Feb 6, 2024 · 1 comment
Closed

string.gmatch expects LayoutMap string to end with delimiter #1

zeb139 opened this issue Feb 6, 2024 · 1 comment

Comments

@zeb139
Copy link

zeb139 commented Feb 6, 2024

Thanks for creating this project! I had some difficulty getting it to work with my setup though.

I have two monitors, one is a tablet that I frequently connect/disconnect.
In LayoutMap, I removed the 3rd resolution that's defined by default and found that I couldn't get the second resolution to work.
LayoutMap="4480x1440=2Monitors|2560x1440=1Monitor" <-- doesn't work

After some trial and error, I found that by adding a trailing |, the functionality was restored.
LayoutMap="4480x1440=2Monitors|2560x1440=1Monitor|" <-- this works
Not sure if this was intentional or not, but wanted to bring it to your attention. My assumption is without the trailing delimiter, the last config in the LayoutMap string would never match.

Maybe you could add functionality to check if the LayoutMap string's last character is the delimiter and add it if it isn't there?

@JoeSiu
Copy link
Owner

JoeSiu commented Feb 8, 2024

@zeb139 Oops that was not intentional. However, I wasn't able to reproduce the issue using the same LayoutMap value. But consider adding the extra trailing | seems to resolve the problem without any noticeable impact, I have now updated the default placeholder value to LayoutMap with the trailing | in v1.0.1. Thanks for the report!

@JoeSiu JoeSiu closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants