Skip to content

Commit

Permalink
fix: make sure there is a visual selection (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored Mar 6, 2024
1 parent 8fa8395 commit 7d8bd23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rplugin/python3/molten/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ def command_evaluate_visual(self, args) -> None:
return
_, lineno_begin, colno_begin, _ = self.nvim.funcs.getpos("'<")
_, lineno_end, colno_end, _ = self.nvim.funcs.getpos("'>")

if lineno_begin == 0 or colno_begin == 0 or lineno_end == 0 or colno_end == 0:
notify_error(self.nvim, "No visual selection found")
return

span = (
(
lineno_begin - 1,
Expand Down

0 comments on commit 7d8bd23

Please sign in to comment.