Skip to content

Commit 142a559

Browse files
authored
Merge pull request #4156 from puremourning/dont-clear-screen-syntax
Use execute() rather than redir to avoid clearing the splash screen o…
2 parents 95a5d54 + f994844 commit 142a559

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)