Skip to content

Commit

Permalink
Merge pull request #49 from ice9js/fix/cursor-losing-position
Browse files Browse the repository at this point in the history
Don't clear view selection before showing labels to save cursor position
  • Loading branch information
ice9js authored Sep 14, 2016
2 parents f568e93 + f3ef45e commit e79d42f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ace_jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ def get_views_sel(views):
selections.append(view.sel())
return selections

def clear_views_sel(views):
"""Clears the selection in all given views"""

for view in views:
view.sel().clear()

class AceJumpCommand(sublime_plugin.WindowCommand):
"""Base command class for AceJump plugin"""

Expand Down Expand Up @@ -177,8 +171,6 @@ def add_labels(self, regex):

self.views.remove(view)

clear_views_sel(self.all_views)

set_views_syntax(self.all_views, list(itertools.repeat(
"Packages/AceJump/AceJump.tmLanguage",
len(self.all_views)
Expand Down

0 comments on commit e79d42f

Please sign in to comment.