Skip to content

Commit

Permalink
Merge branch 'main' into workspace-edit-preserve-tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed May 3, 2024
2 parents ea58461 + cdb2430 commit 2840808
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
os:
- ubuntu-latest
# - macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion plugin/core/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_position(view: sublime.View, event: dict | None = None, point: int | Non
if x is not None and y is not None:
return view.window_to_text((x, y))
try:
return view.sel()[0].begin()
return view.sel()[0].b
except IndexError:
return None

Expand Down
11 changes: 3 additions & 8 deletions plugin/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
from .core.protocol import Position
from .core.protocol import Range
from .core.protocol import Request
from .core.registry import get_position
from .core.registry import LspTextCommand
from .core.registry import windows
from .core.sessions import AbstractViewListener
from .core.sessions import SessionBufferProtocol
from .core.settings import userprefs
from .core.url import parse_uri
from .core.views import diagnostic_severity
from .core.views import first_selection_region
from .core.views import format_code_actions_for_quick_panel
from .core.views import format_diagnostic_for_html
from .core.views import FORMAT_MARKED_STRING
Expand Down Expand Up @@ -115,17 +115,12 @@ def run(
point: int | None = None,
event: dict | None = None
) -> None:
temp_point = point
if temp_point is None:
region = first_selection_region(self.view)
if region is not None:
temp_point = region.begin()
if temp_point is None:
hover_point = get_position(self.view, event, point)
if hover_point is None:
return
wm = windows.lookup(self.view.window())
if not wm:
return
hover_point = temp_point
self._base_dir = wm.get_project_path(self.view.file_name() or "")
self._hover_responses: list[tuple[Hover, MarkdownLangMap | None]] = []
self._document_links: list[DocumentLink] = []
Expand Down

0 comments on commit 2840808

Please sign in to comment.