Quellcode durchsuchen

Use execute() rather than redir to avoid clearing the splash screen on startup

Ben Jackson vor 1 Jahr
Ursprung
Commit
f8af00f84c
1 geänderte Dateien mit 1 neuen und 6 gelöschten Zeilen
  1. 1 6
      python/ycm/vimsupport.py

+ 1 - 6
python/ycm/vimsupport.py

@@ -256,12 +256,7 @@ def VisibleRangeOfBufferOverlaps( bufnr, expanded_range ):
 
 
 def CaptureVimCommand( command ):
-  vim.command( 'redir => b:ycm_command' )
-  vim.command( f'silent! { command }' )
-  vim.command( 'redir END' )
-  output = ToUnicode( vim.eval( 'b:ycm_command' ) )
-  vim.command( 'unlet b:ycm_command' )
-  return output
+  return vim.eval( f"execute( '{EscapeForVim(command)}', 'silent!' )" )
 
 
 def GetSignsInBuffer( buffer_number ):