summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/Wtext.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2001-06-21 17:51:17 (GMT)
committerJust van Rossum <just@letterror.com>2001-06-21 17:51:17 (GMT)
commitb10eb84f291031bd45d62302ec2c98be89241e02 (patch)
tree36e73b7f2c999b18c7d930df6b2011ca2188dda5 /Mac/Tools/IDE/Wtext.py
parent50cb38df43e8b9f0abe2e0cc1218a8a899862417 (diff)
downloadcpython-b10eb84f291031bd45d62302ec2c98be89241e02.zip
cpython-b10eb84f291031bd45d62302ec2c98be89241e02.tar.gz
cpython-b10eb84f291031bd45d62302ec2c98be89241e02.tar.bz2
repaired expandselection and uncomment breakage
Diffstat (limited to 'Mac/Tools/IDE/Wtext.py')
-rw-r--r--Mac/Tools/IDE/Wtext.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Mac/Tools/IDE/Wtext.py b/Mac/Tools/IDE/Wtext.py
index 1518683..3b8973a 100644
--- a/Mac/Tools/IDE/Wtext.py
+++ b/Mac/Tools/IDE/Wtext.py
@@ -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):