From 9250f55952e682a450b6edc888e1edb405669d27 Mon Sep 17 00:00:00 2001 From: Chiel92 Date: Mon, 8 Jul 2013 11:44:06 +0200 Subject: [PATCH] minor fix --- python/ycm/completers/cs/cs_completer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ycm/completers/cs/cs_completer.py b/python/ycm/completers/cs/cs_completer.py index 940a7979..05da2c61 100755 --- a/python/ycm/completers/cs/cs_completer.py +++ b/python/ycm/completers/cs/cs_completer.py @@ -71,12 +71,13 @@ class CsharpCompleter( ThreadedCompleter ): elif command == 'StopServer': self._StopServer() elif command == 'RestartServer': - self._StopServer() + if self._ServerIsRunning(): + self._StopServer() self._StartServer() def _StartServer( self ): """ Start the OmniSharp server """ - if ( not self._ServerIsRunning() ): + if not self._ServerIsRunning(): folder = os.path.dirname( vim.current.buffer.name ) solutionfiles = glob.glob1( folder, '*.sln' ) while not solutionfiles: