Libraryless. Click here for Pure Java version (10001L/56K).
static LineAndColumn caretLineAndCol(JTextComponent tc) { Pair<S, Int> p = textAndCaretPosition(tc); ret charIndexToLineAndColumn(p.a, p.b); }
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1036421 |
| Snippet name: | caretLineAndCol |
| Eternal ID of this version: | #1036421/1 |
| Text MD5: | 4fdfdfec0d81ff42097bbcb44fa6874f |
| Transpilation MD5: | 7fb1934e6b5c0d5a53197162e01f304c |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-12-11 18:16:05 |
| Source code size: | 149 bytes / 4 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 503 / 666 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |