-
Notifications
You must be signed in to change notification settings - Fork 262
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
Python autoindent support and fix to Python Fold Parser #508
Conversation
Note that I did not add or update any tests. I'm not quite familiar enough with RSyntaxTextArea to determine if/where they should be added. I am happy to add tests as may be appropriate. |
This PR will also close the bug noted in issue #512 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the changes requested? Then I think it looks great, thanks for the PR!
RSyntaxTextArea/src/test/java/org/fife/ui/rsyntaxtextarea/folding/PythonFoldParserTest.java
Show resolved
Hide resolved
RSyntaxTextArea/src/main/java/org/fife/ui/rsyntaxtextarea/modes/PythonTokenMaker.java
Show resolved
Hide resolved
if (t!=null && t.length()==1) { | ||
ch = t.charAt(0); | ||
} | ||
return ch=='\\'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be made a little simpler with isSingleChar:
t != null && t.isSingleChar('\\')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Will commit with other changes.
RSyntaxTextArea/src/main/java/org/fife/ui/rsyntaxtextarea/folding/PythonFoldParser.java
Show resolved
Hide resolved
Thanks for the review. (Vaguely related: Looking forward to adding code completion for Jython when I get some time.) |
Thanks for the PR! |
This PR will close the small enhancement requested in issue #507