-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add a Code Model #30
Add a Code Model #30
Conversation
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.
Thanks! In addition to the comments I left, I noticed a huge difference in code formatting:
- Without line numbers the indentation is now 2 spaces, please keep the original, it's much more readable to me
- With line numbers on, the indentation is very wide (12 spaces??) with a lot of empty space around the line numbers. See screenshot
src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeTextArea.kt
Outdated
Show resolved
Hide resolved
src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeTextArea.kt
Outdated
Show resolved
Hide resolved
src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeTextArea.kt
Outdated
Show resolved
Hide resolved
src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/oat/OatDumpParser.kt
Outdated
Show resolved
Hide resolved
ded97c2
to
1b9d157
Compare
Regarding the indentations, I changed things up a bit. Note that we have to account for long line numbers so:
Might seem to sparse, but when line numbers get big:
It makes sense. I have a plan to use the max line number to derive the width, but will leave this to a future cl. |
FYI, the OAT parser has a bug in ti. Infinte loop sometimes |
OK, fixed it. |
That's what I thought. Have you tried eating up into the left indent instead? I don't know how pretty it would look but something like this:
|
This makes it easier to detect jumps and toggle show-line-number
This makes it easier to detect jumps and toggle show-line-number