After opening a buffer, configure it according to the supplied options, which are as defined by the OpenFilename method.
( command, filename, fix, position, watch )
| 1361 | |
| 1362 | |
| 1363 | def _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 | |
| 1381 | def BuildRange( start_line, end_line ): |