From dc01ad8240a5f1e2353a215d96b67e564731bce0 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 9 Jan 2014 13:49:06 -0800 Subject: [PATCH] Ensuring there are no "press enter" prompts This is for the diagnostic echo. --- python/ycm/vimsupport.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 91245c59..b2c59ae4 100644 --- a/python/ycm/vimsupport.py +++ b/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( "'", "''" )