فهرست منبع

Ensuring there are no "press enter" prompts

This is for the diagnostic echo.
Strahinja Val Markovic 11 سال پیش
والد
کامیت
dc01ad8240
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      python/ycm/vimsupport.py

+ 8 - 0
python/ycm/vimsupport.py

@@ -286,8 +286,16 @@ def EchoTextVimWidth( text ):
   vim_width = GetIntValue( '&columns' )
   truncated_text = str( text )[ : int( vim_width * 0.9 ) ]
   truncated_text.replace( '\n', ' ' )
+
+  old_ruler = GetIntValue( '&ruler' )
+  old_showcmd = GetIntValue( '&showcmd' )
+  vim.command( 'set noruler noshowcmd' )
+
   EchoText( truncated_text, False )
 
+  vim.command( 'let &ruler = {0}'.format( old_ruler ) )
+  vim.command( 'let &showcmd = {0}'.format( old_showcmd ) )
+
 
 def EscapeForVim( text ):
   return text.replace( "'", "''" )