MCPcopy Create free account
hub / github.com/ycm-core/YouCompleteMe / CurrentLineContentsAndCodepointColumn

Function CurrentLineContentsAndCodepointColumn

python/ycm/vimsupport.py:96–104  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

94
95
96def 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
107def TextAfterCursor():

Callers

nothing calls this directly

Calls 2

CurrentLineContentsFunction · 0.85
CurrentColumnFunction · 0.85

Tested by

no test coverage detected