Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /plugins/lineabstraction.py [17c6bf] .. [82ddff] Maximize Restore

  Switch to side-by-side view

--- a/plugins/lineabstraction.py
+++ b/plugins/lineabstraction.py
@@ -107,8 +107,13 @@
         __metaclass__ = Property
         def get(self):
             x,y = self.stc.GetSelection()
+            x,y = min(x,y), max(x,y)
             start = self._line_range(self.stc.LineFromPosition(x))[0]
-            end = self._line_range(self.stc.LineFromPosition(y))[1]
+            #we use y-1 because otherwise
+            #for i in xrange(10):
+            #    lines.selectedlinesi = lines.selectedlinesi
+            #will continually select more and more lines
+            end = self._line_range(self.stc.LineFromPosition(y-1))[1]
             return self.stc.LineFromPosition(start), self.stc.LineFromPosition(max(end-1, start))+1
         
         def set(self, range):