MCPcopy
hub / github.com/ycm-core/YouCompleteMe / GetBufferNumberForFilename

Function GetBufferNumberForFilename

python/ycm/vimsupport.py:148–152  ·  view source on GitHub ↗
( filename, create_buffer_if_needed = False )

Source from the content-addressed store, hash-verified

146
147
148def GetBufferNumberForFilename( filename, create_buffer_if_needed = False ):
149 realpath = os.path.realpath( filename )
150 return MADEUP_FILENAME_TO_BUFFER_NUMBER.get( realpath, GetIntValue(
151 f"bufnr( '{ EscapeForVim( realpath ) }', "
152 f"{ int( create_buffer_if_needed ) } )" ) )
153
154
155def GetCurrentBufferFilepath():

Callers 5

_GetNumNonVisibleFilesFunction · 0.85
_OpenFileInSplitIfNeededFunction · 0.85
CloseBuffersForFilenameFunction · 0.85

Calls 3

GetIntValueFunction · 0.85
EscapeForVimFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected