Skip to content

Commit dadeb95

Browse files
committed
Revert "context menu: take the mouse position into account"
This reverts commit 86db495. The way Sublime's stock context menu stuff (e.g. Cut, Copy) works does not clear existing selections.
1 parent 86db495 commit dadeb95

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

git-blame.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,10 @@ def on_phantom_close(self, href):
175175
else:
176176
self.view.erase_phantoms('git-blame')
177177

178-
def want_event(self):
179-
return True
180-
181-
def run(self, edit, event=None):
178+
def run(self, edit):
182179
if not view_is_suitable(self.view):
183180
return
184181

185-
if event:
186-
# This command was ran from the context menu. Before proceeding,
187-
# move the caret to where the mouse was clicked.
188-
mouse_position = (event["x"], event["y"])
189-
text_point = self.view.window_to_text(mouse_position)
190-
self.view.sel().clear()
191-
self.view.sel().add(sublime.Region(text_point))
192-
193182
phantoms = []
194183
self.view.erase_phantoms('git-blame')
195184
# Before adding the phantom, see if the current phantom that is displayed is at the same spot at the selection

0 commit comments

Comments
 (0)