-
Notifications
You must be signed in to change notification settings - Fork 3
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 getLine to get line by index #6
Conversation
Hello @Bodigrim , |
src/Data/Text/Mixed/Rope.hs
Outdated
@@ -562,3 +563,21 @@ utf16SplitAtPosition (Utf16.Position l c) rp = do | |||
let (beforeLine, afterLine) = splitAtLine l rp | |||
(beforeColumn, afterColumn) <- utf16SplitAt c afterLine | |||
Just (beforeLine <> beforeColumn, afterColumn) | |||
|
|||
-- | Get a line by its 0-based index. | |||
-- Returns "" if the index is out of bounds. |
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.
I think monospace font would look better, more prominent:
-- Returns "" if the index is out of bounds. | |
-- Returns @""@ if the index is out of bounds. |
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.
Overall makes sense to me, thanks for working on it.
Thanks for review. |
@jhrcek how is it going? Any plans for further progress? |
Hello @Bodigrim |
@jhrcek sure, let's catch up tomorrow. Or today if it still works for you. |
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.
Looks good to me.
Thanks a lot @jhrcek! |
@jhrcek the repo is in ready-for-release state now, waiting for you to green-light that it fits HLS needs. |
WIP - implementing #5
It's a bit more labor intensive than I initially anticipated, so opening draft for potential early feedback.
TODO: