]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
repaired expandselection and uncomment breakage
authorJust van Rossum <just@letterror.com>
Thu, 21 Jun 2001 17:51:17 +0000 (17:51 +0000)
committerJust van Rossum <just@letterror.com>
Thu, 21 Jun 2001 17:51:17 +0000 (17:51 +0000)
Mac/Tools/IDE/Wtext.py

index 151868335acf8b93b12bb3b6ac66ddc3f27af33d..3b8973ad11ff386ec5678b31d3f37a0ccc32e48d 100644 (file)
@@ -279,8 +279,8 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
                selstart, selend = min(oldselstart, oldselend), max(oldselstart, oldselend)
                if selstart <> selend and chr(self.ted.WEGetChar(selend-1)) == '\r':
                        selend = selend - 1
-               newselstart, dummy = self.ted.WEFindLine(selstart, 0)
-               dummy, newselend = self.ted.WEFindLine(selend, 0)
+               newselstart, dummy = self.ted.WEFindLine(selstart, 1)
+               dummy, newselend = self.ted.WEFindLine(selend, 1)
                if oldselstart <> newselstart or  oldselend <> newselend:
                        self.ted.WESetSelection(newselstart, newselend)
                        self.updatescrollbars()
@@ -608,8 +608,9 @@ class TextEditor(EditText):
 
 
 import re
-commentPat = re.compile("[ \t]*\(#\)")
-indentPat = re.compile("\t*")
+commentPat = re.compile("[ \t]*(#)")
+indentPat = re.compile("[ \t]*")
+
 
 class PyEditor(TextEditor):