Browse files

Consecutive lines

  • Loading branch information...
1 parent 151a1ac commit f3a07d3c177ce9d6a99ee7d8ebf7ac09b3e42478 @agibsonsw committed Oct 11, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 AndyEdits.py
View
5 AndyEdits.py
@@ -42,8 +42,9 @@ def adjustEdits(view):
if edited_last:
edited.extend(edited_last)
eov = view.size()
- for i, r in enumerate(edited):
- if i > 0 and r.begin() == prev_end + 1:
+ for i, r in enumerate(sorted(edited)):
+ print r
+ if i > 0 and r.begin() <= prev_end + 1:
# collapse adjoining regions
new_edits.append(sublime.Region(prev_begin, r.end()))
elif r.begin() < eov:

0 comments on commit f3a07d3

Please sign in to comment.