From 740c0cbf0cbd506259de7c93704a91318bb52942 Mon Sep 17 00:00:00 2001 From: Janos Wortmann Date: Wed, 10 Apr 2024 18:41:10 +0200 Subject: [PATCH] Revert "Exempt Linux" This reverts commit 4dd2e91ee9f9bc6bf8b93082b5be4df7243b0c75. --- plugin/core/constants.py | 1 - plugin/session_buffer.py | 4 +--- tests/test_single_document.py | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/plugin/core/constants.py b/plugin/core/constants.py index 5fc4fbfa5..e8a84f34e 100644 --- a/plugin/core/constants.py +++ b/plugin/core/constants.py @@ -11,7 +11,6 @@ ST_VERSION = int(sublime.version()) -ST_PLATFORM = sublime.platform() # Keys for View.add_regions HOVER_HIGHLIGHT_KEY = 'lsp_hover_highlight' diff --git a/plugin/session_buffer.py b/plugin/session_buffer.py index 1fbbc1925..e2c6907de 100644 --- a/plugin/session_buffer.py +++ b/plugin/session_buffer.py @@ -1,6 +1,5 @@ from .core.constants import DOCUMENT_LINK_FLAGS from .core.constants import SEMANTIC_TOKEN_FLAGS -from .core.constants import ST_PLATFORM from .core.protocol import ColorInformation from .core.protocol import Diagnostic from .core.protocol import DocumentDiagnosticParams @@ -169,8 +168,7 @@ def _check_did_open(self, view: sublime.View) -> None: def _check_did_close(self, view: sublime.View) -> None: if self.opened and self.should_notify_did_close(): - if ST_PLATFORM != 'linux': # https://github.com/sublimelsp/LSP/pull/2438 - self.purge_changes_async(view, suppress_requests=True) + self.purge_changes_async(view, suppress_requests=True) self.session.send_notification(did_close(uri=self._last_known_uri)) self.opened = False diff --git a/tests/test_single_document.py b/tests/test_single_document.py index 8a655a97c..4ac3b4255 100644 --- a/tests/test_single_document.py +++ b/tests/test_single_document.py @@ -9,8 +9,6 @@ from setup import YieldPromise import os import sublime -import sys -import unittest try: @@ -408,9 +406,6 @@ class AnotherDocumentTestCase(TextDocumentTestCase): def get_test_name(cls) -> str: return "testfile2" - # The fix from https://github.com/sublimelsp/LSP/pull/2438 oddly causes an unrelated test to fail on Linux, so it's - # only applied on Windows and macOS for now. - @unittest.skipIf(sys.platform.startswith("linux"), "not working as expected on Linux") def test_did_change_before_did_close(self) -> 'Generator': assert self.view self.view.window().run_command("chain", {