From 9c93244d3b59a92e2378dc80a54b4fe007a6af63 Mon Sep 17 00:00:00 2001 From: Nader Akoury Date: Fri, 11 Nov 2016 10:15:22 -0800 Subject: [PATCH] Addressed review comments and fixed tests --- python/ycm/tests/vimsupport_test.py | 2 ++ python/ycm/vimsupport.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/python/ycm/tests/vimsupport_test.py b/python/ycm/tests/vimsupport_test.py index 131a4360..ab95d0e5 100644 --- a/python/ycm/tests/vimsupport_test.py +++ b/python/ycm/tests/vimsupport_test.py @@ -1262,6 +1262,8 @@ def WriteToPreviewWindow_test( vim_current, vim_command ): call( 'modifiable', True ), call( 'readonly', False ), call( 'buftype', 'nofile' ), + call( 'bufhidden', 'wipe' ), + call( 'buflisted', False ), call( 'swapfile', False ), call( 'modifiable', False ), call( 'modified', False ), diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 5ca2c46c..f30de92a 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -928,6 +928,8 @@ def WriteToPreviewWindow( message ): vim.current.buffer[:] = message.splitlines() vim.current.buffer.options[ 'buftype' ] = 'nofile' + vim.current.buffer.options[ 'bufhidden' ] = 'wipe' + vim.current.buffer.options[ 'buflisted' ] = False vim.current.buffer.options[ 'swapfile' ] = False vim.current.buffer.options[ 'modifiable' ] = False vim.current.buffer.options[ 'readonly' ] = True