diff --git a/plugin/completion/bin_complete.py b/plugin/completion/bin_complete.py index 9e7ff84b..126154ed 100644 --- a/plugin/completion/bin_complete.py +++ b/plugin/completion/bin_complete.py @@ -141,9 +141,9 @@ def init(self, view, includes, settings, project_folder): # init needed variables from settings self.flags_dict[view.id()] = [] for include in includes: - self.flags_dict[view.id()].append('-I' + include) + self.flags_dict[view.id()].append('-I "{}"'.format(include)) - # support .clang_complete file with -I entries + # support .clang_complete file with -I "" entries if settings.search_clang_complete: log.debug(" searching for .clang_complete in %s up to %s", file_folder, project_folder) diff --git a/tests/test_complete.py b/tests/test_complete.py index e5a13203..41aa126b 100644 --- a/tests/test_complete.py +++ b/tests/test_complete.py @@ -3,6 +3,7 @@ import tempfile import time import logging +import platform from os import path from unittest import TestCase @@ -114,6 +115,9 @@ def test_complete(self): self.assertTrue(expected in completer.completions) def test_complete_vector(self): + if platform.system() == "Windows": + logging.warning(" NOT TESTING VECTOR COMPLETION ON WINDOWS!") + return file_name = path.join(path.dirname(__file__), 'test_vector.cpp') self.view = sublime.active_window().open_file(file_name) while self.view.is_loading():