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

Do not consider case of partial text when offering hints #7593

Closed
max-privato opened this issue Jun 21, 2021 · 3 comments · Fixed by #7603
Closed

Do not consider case of partial text when offering hints #7593

max-privato opened this issue Jun 21, 2021 · 3 comments · Fixed by #7603
Assignees
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit

Comments

@max-privato
Copy link

max-privato commented Jun 21, 2021

Description

A useful characteristic of OMEdit is the hints we get when we write code.
For instance, consider writing a Unit of Measure. There are so many of them in MSL that having help in finding the correct one is a boon.
However, to have a hint one should write the first part of what they are looking for case sensitive,
This is not optimal for two reasons:

  1. when we look for something maybe we don't know exactly if the part of the name we remember is uppercase or lowercase or whatever.
  2. Writing all lowercase is faster, and programmers prefer to use it even though they know the correct case.

For instance if I look for "angular" quantities, when I write
Modelica.SIunits.ang
I don't get any hint, while if I write
Modelica.SIunits.Ang I get hints.

Other tools, such as Qt Creator, give code hints in the way I propose for OpenModelica (i.e. not considering the case of what one writes).
Obviously, if my proposal is agreed upon, making the correction would involve a minimal effort (possibly changing a single row of code).

Steps to Reproduce

Expected Behavior

Code should be hinted based on what the user writes, no matter the case of the letters

Screenshots

Version and OS

  • OpenModelica Version: [e.g. omc --version or Help->About OMEdit from OMEdit]
  • OS: [e.g. Windows 10, 64 bit]
  • Versions of used Modelica libraries if applicable

Additional Context

@casella casella added the COMP/GUI/OMEdit Issue and pull request related to OMEdit label Jun 21, 2021
@casella
Copy link
Contributor

casella commented Jun 21, 2021

@adeas31, could this be a one-liner modification, as @ceraolo suggests?

@casella
Copy link
Contributor

casella commented Jun 22, 2021

Thanks Adeel, highly appreciated!

@max-privato
Copy link
Author

Thank you!
By the way, I made a mistake: the fix involved two lines instead of one :-)
Thanks again also for the speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants