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

Potential bug in InputHandler.java #182

Closed
thibolu opened this issue Apr 5, 2018 · 0 comments
Closed

Potential bug in InputHandler.java #182

thibolu opened this issue Apr 5, 2018 · 0 comments

Comments

@thibolu
Copy link

thibolu commented Apr 5, 2018

Hi,
I found suspicious code smell in src/Java/JavaUI/source/org/ops/ui/editor/swing/ash/InputHandler.java, line 422 to 426:

      if(console.getCaretPosition() < console.getCommandStart())
        console.setCaretPosition(console.getDocumentLength());
      else if(console.getCaretPosition() < console.getCommandStart()) {
        console.getToolkit().beep();
        return;
      }

The condition in the else if statement is the same as in the if statement, so line 425-426 will never be executed.
Since I don't have domain knowledge for this project, I don't know if this is important or what the correct condition should be, but I want to report it just in case. Thanks!

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

1 participant