Kaydet (Commit) b10eb84f authored tarafından Just van Rossum's avatar Just van Rossum

repaired expandselection and uncomment breakage

üst 50cb38df
...@@ -279,8 +279,8 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget): ...@@ -279,8 +279,8 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
selstart, selend = min(oldselstart, oldselend), max(oldselstart, oldselend) selstart, selend = min(oldselstart, oldselend), max(oldselstart, oldselend)
if selstart <> selend and chr(self.ted.WEGetChar(selend-1)) == '\r': if selstart <> selend and chr(self.ted.WEGetChar(selend-1)) == '\r':
selend = selend - 1 selend = selend - 1
newselstart, dummy = self.ted.WEFindLine(selstart, 0) newselstart, dummy = self.ted.WEFindLine(selstart, 1)
dummy, newselend = self.ted.WEFindLine(selend, 0) dummy, newselend = self.ted.WEFindLine(selend, 1)
if oldselstart <> newselstart or oldselend <> newselend: if oldselstart <> newselstart or oldselend <> newselend:
self.ted.WESetSelection(newselstart, newselend) self.ted.WESetSelection(newselstart, newselend)
self.updatescrollbars() self.updatescrollbars()
...@@ -608,8 +608,9 @@ class TextEditor(EditText): ...@@ -608,8 +608,9 @@ class TextEditor(EditText):
import re import re
commentPat = re.compile("[ \t]*\(#\)") commentPat = re.compile("[ \t]*(#)")
indentPat = re.compile("\t*") indentPat = re.compile("[ \t]*")
class PyEditor(TextEditor): class PyEditor(TextEditor):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment