From dc52b73048e5e1213d03f0d7372f72b90be87fc0 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Thu, 22 Feb 2018 22:05:38 +0000 Subject: [PATCH] Don't open the quickfix window after fixit --- README.md | 8 ++++---- python/ycm/tests/vimsupport_test.py | 11 ----------- python/ycm/vimsupport.py | 1 - 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1ae05e5c..fa79fff0 100644 --- a/README.md +++ b/README.md @@ -1766,10 +1766,10 @@ manually saved. A confirmation dialog is opened prior to doing this to remind you that this is about to happen. Once the modifications have been made, the quickfix list (see `:help quickfix`) -is opened and populated with the locations of all modifications. This can be -used to review all automatic changes made. Typically, use the `CTRL-W -` combination to open the selected file in a new split. It is possible -to customize how the quickfix window is opened by using [the `YcmQuickFixOpened` +is populated with the locations of all modifications. This can be used to review +all automatic changes made by using `:copen`. Typically, use the `CTRL-W +` combination to open the selected file in a new split. It is possible to +customize how the quickfix window is opened by using [the `YcmQuickFixOpened` autocommand](#the-ycmquickfixopened-autocommand). The buffers are *not* saved automatically. That is, you must save the modified diff --git a/python/ycm/tests/vimsupport_test.py b/python/ycm/tests/vimsupport_test.py index 6f42002f..74e35a32 100644 --- a/python/ycm/tests/vimsupport_test.py +++ b/python/ycm/tests/vimsupport_test.py @@ -719,11 +719,6 @@ def ReplaceChunks_SingleFile_Open_test( vim_command, 'type': 'F' } ] ) ) ), ] ) - vim_command.assert_has_exact_calls( [ - call( 'botright copen' ), - call( 'silent! wincmd p' ) - ] ) - set_fitting_height.assert_called_once_with() # And it is ReplaceChunks that prints the message showing the number of # changes @@ -817,10 +812,7 @@ def ReplaceChunks_SingleFile_NotOpen_test( vim_command, vim_command.assert_has_exact_calls( [ call( 'lclose' ), call( 'hide' ), - call( 'botright copen' ), - call( 'silent! wincmd p' ) ] ) - set_fitting_height.assert_called_once_with() # And update the quickfix list vim_eval.assert_has_exact_calls( [ @@ -1202,10 +1194,7 @@ def ReplaceChunks_MultiFile_Open_test( vim_command, vim_command.assert_has_exact_calls( [ call( 'lclose' ), call( 'hide' ), - call( 'botright copen' ), - call( 'silent! wincmd p' ) ] ) - set_fitting_height.assert_called_once_with() # And update the quickfix list with each entry vim_eval.assert_has_exact_calls( [ diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 586a269f..70a1f295 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -832,7 +832,6 @@ def ReplaceChunks( chunks, silent=False ): if not silent: if locations: SetQuickFixList( locations ) - OpenQuickFixList() PostVimMessage( 'Applied {0} changes'.format( len( chunks ) ), warning = False )