From bb7bbdb9741f36dcf9294b3e5d77299c1a518b32 Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Tue, 30 Jan 2018 19:26:22 +0100 Subject: [PATCH] Fix truncation When the message is exactly as wide as the vim window, vim still displays "press enter..." message. Wen we want to avoid that we need to cut the message one character shorter. --- python/ycm/vimsupport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index ffac5e5e..7070d55f 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -464,7 +464,7 @@ def PostVimMessage( message, warning = True, truncate = False ): vim_width = GetIntValue( '&columns' ) message = message.replace( '\n', ' ' ) - if len( message ) > vim_width: + if len( message ) >= vim_width: message = message[ : vim_width - 4 ] + '...' old_ruler = GetIntValue( '&ruler' )