Comments (1)
This sounds like a good addition. Are you up for creating a PR?
Before doing line.location + textLocation.column
we might want to check that the resulting location is within the bounds of the line and return nil otherwise. I haven't tested it but something like the following guard should do the trick.
guard textLocation.column >= 0 && textLocation.column <= line.data.totalLength else {
return nil
}
from runestone.
Related Issues (20)
- Kotlin language support HOT 1
- Include more developer fonts HOT 1
- Does this work with MacOS ? HOT 2
- `markedRange` is not cleared when multi stage input finished. HOT 1
- Xcode 15.0(iOS 17) - cursor is not visible when becoming first responder HOT 3
- Internal browser HOT 1
- How to run this project? HOT 1
- Scroll on mouse select
- When will there be any discounts recently? HOT 1
- Show dot files HOT 1
- Support for the Nix language HOT 1
- Line number gutter blocking selection bar HOT 2
- Crash due to Modifications to the layout engine from background thread. HOT 2
- Caret position not updating when setting selectedRange HOT 1
- Show character code point on selected code or current character at cursor HOT 1
- contentSize doesn't return real content size HOT 2
- On iOS “search - replace all - undo” will crash the app HOT 1
- VIM keybinding support HOT 1
- Creating a note in Google Drive directly fails HOT 1
- Get content size before it actually renders HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runestone.