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

Function _SetUpLoadedBuffer

python/ycm/vimsupport.py:1363–1378  ·  view source on GitHub ↗

After opening a buffer, configure it according to the supplied options, which are as defined by the OpenFilename method.

( command, filename, fix, position, watch )

Source from the content-addressed store, hash-verified

1361
1362
1363def _SetUpLoadedBuffer( command, filename, fix, position, watch ):
1364 """After opening a buffer, configure it according to the supplied options,
1365 which are as defined by the OpenFilename method."""
1366
1367 if command == 'split':
1368 vim.current.window.options[ 'winfixheight' ] = fix
1369 if command == 'vsplit':
1370 vim.current.window.options[ 'winfixwidth' ] = fix
1371
1372 if watch:
1373 vim.current.buffer.options[ 'autoread' ] = True
1374 vim.command( "exec 'au BufEnter <buffer> :silent! checktime {0}'"
1375 .format( filename ) )
1376
1377 if position == 'end':
1378 vim.command( 'silent! normal! Gzz' )
1379
1380
1381def BuildRange( start_line, end_line ):

Callers 1

OpenFilenameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected