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

fix: f, g, and h no longer impact behavior of / #2043

Closed
wants to merge 1 commit into from

Conversation

mgreminger
Copy link
Contributor

@mgreminger mgreminger commented Jul 2, 2023

This pull request removes special treatment of f, g, and h as implicit functions while typing in expressions. The main side affect of the old behavior was that the divide command (typing /) worked differently for variables containing f, g, or h as compared to those without f, g, or h. Fixes #1869

In EngineeringPaper.xyz, the user needs to type in unit names, many of which contain f, g, or h. When typing a unit name with one of these letters, the divide command behavior is surprising, see the screen recording below:

old.mov

After this change, the behavior is consistent as with variables names that don't contain f, g, or h:

new.mov

In this pull request, I simply removed the special treatment of f, g, and h. All of the current tests still pass. There doesn't seem to be other side affects besides the change in the behavior of the divide command. For example, the math json output doesn't seem to be impacted.

There's the possibility, of course, that I'm missing a side affect of this change. In that case, it may be desirable to keep the current behavior as the default and to provide the user the option to change which characters are treated as implicit functions. If you would like me to implement this as an option, let me know, and I would be happy to implement. I was thinking it would be best to add to the InlineShortcutsOptions object as maybe implicitFunctions.

Removes special treatment of f, g, and h as implicit functions. Main side affect was that divide command worked different for variables containing f, g, or h compared to those without f, g, or h

fixes arnog#1869
@mgreminger
Copy link
Contributor Author

I'm closing this pull request since the underlying issue has been resolved in 0.98.5. Thanks for the fix.

@mgreminger mgreminger closed this Jan 31, 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

Successfully merging this pull request may close these issues.

Different behaviour of / depending on the letter that precedes it
1 participant