Skip to content

Commit

Permalink
* don't loop over view.sel()
Browse files Browse the repository at this point in the history
  • Loading branch information
DisposaBoy committed Feb 23, 2013
1 parent 26ef33e commit 2740a50
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gosubl/gs.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,7 @@ def checked(domain, k):

def sel(view, i=0):
try:
# view.sel() is a sublime.RegionSet. we want actual a python list behaviour :|
l = [r for r in view.sel()]
return l[i]
return view.sel()[i]
except Exception:
return sublime.Region(0, 0)

Expand Down

0 comments on commit 2740a50

Please sign in to comment.