Kaydet (Commit) df506ea9 authored tarafından Kurt B. Kaiser's avatar Kurt B. Kaiser

1. Patch 1196895 Jeff Shute:

   New files are colorized by default, and colorizing is removed when
   saving as non-Python files. Patch 1196895 Jeff Shute
   Closes Python Bugs 775012 and 800432, partial fix IDLEfork 763524

2. Update help.txt for left/right word delete

M CREDITS.txt
M ColorDelegator.py
M EditorWindow.py
M NEWS.txt
M help.txt
üst 2e23e08f
...@@ -23,8 +23,8 @@ Neal Norwitz (code check and clean-up), and Chui Tey (RPC integration, debugger ...@@ -23,8 +23,8 @@ Neal Norwitz (code check and clean-up), and Chui Tey (RPC integration, debugger
integration and persistent breakpoints). integration and persistent breakpoints).
Scott David Daniels, Hernan Foffani, Christos Georgiou, Martin v. Löwis, Scott David Daniels, Hernan Foffani, Christos Georgiou, Martin v. Löwis,
Jason Orendorff, Noam Raphael, Josh Robb, Nigel Rowe, and Bruce Sherwood have Jason Orendorff, Noam Raphael, Josh Robb, Nigel Rowe, Bruce Sherwood, and
submitted useful patches. Thanks, guys! Jeff Shute have submitted useful patches. Thanks, guys!
For additional details refer to NEWS.txt and Changelog. For additional details refer to NEWS.txt and Changelog.
......
...@@ -237,6 +237,9 @@ class ColorDelegator(Delegator): ...@@ -237,6 +237,9 @@ class ColorDelegator(Delegator):
if DEBUG: print "colorizing stopped" if DEBUG: print "colorizing stopped"
return return
def removecolors(self):
for tag in self.tagdefs.keys():
self.tag_remove(tag, "1.0", "end")
def main(): def main():
from Percolator import Percolator from Percolator import Percolator
......
...@@ -491,7 +491,7 @@ class EditorWindow(object): ...@@ -491,7 +491,7 @@ class EditorWindow(object):
self.center() self.center()
def ispythonsource(self, filename): def ispythonsource(self, filename):
if not filename: if not filename or os.path.isdir(filename):
return True return True
base, ext = os.path.splitext(os.path.basename(filename)) base, ext = os.path.splitext(os.path.basename(filename))
if os.path.normcase(ext) in (".py", ".pyw"): if os.path.normcase(ext) in (".py", ".pyw"):
...@@ -532,6 +532,7 @@ class EditorWindow(object): ...@@ -532,6 +532,7 @@ class EditorWindow(object):
def rmcolorizer(self): def rmcolorizer(self):
if not self.color: if not self.color:
return return
self.color.removecolors()
self.per.removefilter(self.undo) self.per.removefilter(self.undo)
self.per.removefilter(self.color) self.per.removefilter(self.color)
self.color = None self.color = None
......
...@@ -3,6 +3,10 @@ What's New in IDLE 1.2a0? ...@@ -3,6 +3,10 @@ What's New in IDLE 1.2a0?
*Release date: XX-XXX-2005* *Release date: XX-XXX-2005*
- New files are colorized by default, and colorizing is removed when
saving as non-Python files. Patch 1196895 Jeff Shute
Closes Python Bugs 775012 and 800432, partial fix IDLEfork 763524
- Improve subprocess link error notification. - Improve subprocess link error notification.
- run.py: use Queue's blocking feature instead of sleeping in the main - run.py: use Queue's blocking feature instead of sleeping in the main
......
...@@ -132,7 +132,8 @@ Additional Help Sources: ...@@ -132,7 +132,8 @@ Additional Help Sources:
Basic editing and navigation: Basic editing and navigation:
Backspace deletes to the left; DEL deletes to the right. Backspace deletes char to the left; DEL deletes char to the right.
Control-backspace deletes word left, Control-DEL deletes word right.
Arrow keys and Page Up/Down move around. Arrow keys and Page Up/Down move around.
Control-left/right Arrow moves by words in a strange but useful way. Control-left/right Arrow moves by words in a strange but useful way.
Home/End go to begin/end of line. Home/End go to begin/end of line.
......
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