Skip to content

Commit

Permalink
nicer style
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Apr 22, 2021
1 parent f602749 commit b6d1a14
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions plugin/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,13 @@ def run(
point: Optional[int] = None,
event: Optional[dict] = None
) -> None:
temp_point = point
if temp_point is None:
region = first_selection(self.view)
if region:
temp_point = region.begin()
if temp_point is None:
return
window = self.view.window()
if not window:
return
hover_point = temp_point
region = first_selection(self.view)
if point is None and region is None:
return
hover_point = point or region.begin()
wm = windows.lookup(window)
self._base_dir = wm.get_project_path(self.view.file_name() or "")
self._hover = None # type: Optional[Any]
Expand Down

0 comments on commit b6d1a14

Please sign in to comment.