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

:set line_w bounds check #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

max2556
Copy link
Contributor

@max2556 max2556 commented Jun 27, 2024

:set line_w now checks if provided value is greater or equals to 1.
If not - prints message and uses TOOLS.default_line_w value

u32 val = cl_cmd->d.set.d.line_w.value;
if(val < 1) {
msg_to_show = str_new("line_w must be 1 or greater, using default");
val = TOOLS.default_line_w;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to only show the message on error. It will be clearer for the user

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

Successfully merging this pull request may close these issues.

None yet

2 participants