Returns the line contents as a unicode string and the 0-based current column as a codepoint offset. If the current column is outside the line, returns the column position at the end of the line.
()
| 94 | |
| 95 | |
| 96 | def CurrentLineContentsAndCodepointColumn(): |
| 97 | """Returns the line contents as a unicode string and the 0-based current |
| 98 | column as a codepoint offset. If the current column is outside the line, |
| 99 | returns the column position at the end of the line.""" |
| 100 | line = CurrentLineContents() |
| 101 | byte_column = CurrentColumn() |
| 102 | # ByteOffsetToCodepointOffset expects 1-based offset. |
| 103 | column = ByteOffsetToCodepointOffset( line, byte_column + 1 ) - 1 |
| 104 | return line, column |
| 105 | |
| 106 | |
| 107 | def TextAfterCursor(): |
nothing calls this directly
no test coverage detected