MCPcopy Index your code
hub / github.com/ycm-core/YouCompleteMe / SearchInCurrentBuffer

Function SearchInCurrentBuffer

python/ycm/vimsupport.py:1195–1198  ·  view source on GitHub ↗

Returns the 1-indexed line on which the pattern matches (going UP from the current position) or 0 if not found

( pattern )

Source from the content-addressed store, hash-verified

1193
1194
1195def SearchInCurrentBuffer( pattern ):
1196 """ Returns the 1-indexed line on which the pattern matches
1197 (going UP from the current position) or 0 if not found """
1198 return GetIntValue( f"search('{ EscapeForVim( pattern ) }', 'Wcnb')" )
1199
1200
1201def LineTextInCurrentBuffer( line_number ):

Callers 1

InsertNamespaceFunction · 0.85

Calls 2

GetIntValueFunction · 0.85
EscapeForVimFunction · 0.85

Tested by

no test coverage detected