Skip to content

Commit f8af00f

Browse files
committed
Use execute() rather than redir to avoid clearing the splash screen on startup
1 parent f93c2e9 commit f8af00f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

python/ycm/vimsupport.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,7 @@ def VisibleRangeOfBufferOverlaps( bufnr, expanded_range ):
256256

257257

258258
def CaptureVimCommand( command ):
259-
vim.command( 'redir => b:ycm_command' )
260-
vim.command( f'silent! { command }' )
261-
vim.command( 'redir END' )
262-
output = ToUnicode( vim.eval( 'b:ycm_command' ) )
263-
vim.command( 'unlet b:ycm_command' )
264-
return output
259+
return vim.eval( f"execute( '{EscapeForVim(command)}', 'silent!' )" )
265260

266261

267262
def GetSignsInBuffer( buffer_number ):

0 commit comments

Comments
 (0)