]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
1. Patch 1196895 Jeff Shute:
authorKurt B. Kaiser <kbk@shore.net>
Sun, 12 Jun 2005 04:33:30 +0000 (04:33 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Sun, 12 Jun 2005 04:33:30 +0000 (04:33 +0000)
   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

Lib/idlelib/CREDITS.txt
Lib/idlelib/ColorDelegator.py
Lib/idlelib/EditorWindow.py
Lib/idlelib/NEWS.txt
Lib/idlelib/help.txt

index ef9c450aa61e0d2b8fe1c6aa50bdd99946f12df1..6f4e95d0b27420456f51632324a6474fa1ecccd9 100644 (file)
@@ -23,8 +23,8 @@ Neal Norwitz (code check and clean-up), and Chui Tey (RPC integration, debugger
 integration and persistent breakpoints).
 
 Scott David Daniels, Hernan Foffani, Christos Georgiou, Martin v. Löwis, 
-Jason Orendorff, Noam Raphael, Josh Robb, Nigel Rowe, and Bruce Sherwood have
-submitted useful patches.  Thanks, guys!
+Jason Orendorff, Noam Raphael, Josh Robb, Nigel Rowe, Bruce Sherwood, and
+Jeff Shute have submitted useful patches.  Thanks, guys!
 
 For additional details refer to NEWS.txt and Changelog.
 
index 019e5d4166971592744197eb489ff0dbaa61374e..f258b346272b66e4b5fdc15721c7b83474ee1103 100644 (file)
@@ -237,6 +237,9 @@ class ColorDelegator(Delegator):
                     if DEBUG: print "colorizing stopped"
                     return
 
+    def removecolors(self):
+        for tag in self.tagdefs.keys():
+            self.tag_remove(tag, "1.0", "end")
 
 def main():
     from Percolator import Percolator
index ed6b1a19fdf8dee171b517ed85eddcafdd939c8e..ef825f18895b6d505aa69fc96924c8060368eecd 100644 (file)
@@ -491,7 +491,7 @@ class EditorWindow(object):
             self.center()
 
     def ispythonsource(self, filename):
-        if not filename:
+        if not filename or os.path.isdir(filename):
             return True
         base, ext = os.path.splitext(os.path.basename(filename))
         if os.path.normcase(ext) in (".py", ".pyw"):
@@ -532,6 +532,7 @@ class EditorWindow(object):
     def rmcolorizer(self):
         if not self.color:
             return
+        self.color.removecolors()
         self.per.removefilter(self.undo)
         self.per.removefilter(self.color)
         self.color = None
index 03ba1148c4f8fe3bd258cbbc4eff27d240e76f61..341e241d3f68ac9474650c555ddfde38a5c6b29d 100644 (file)
@@ -3,6 +3,10 @@ What's New in IDLE 1.2a0?
 
 *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.
 
 - run.py: use Queue's blocking feature instead of sleeping in the main
index e91e8c640f69f601b091c42ae1e3f02dd98ef411..6d2ba2fffe0726d27b8d41ac2f56d88cf020eb56 100644 (file)
@@ -132,7 +132,8 @@ Additional Help Sources:
 
 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.
        Control-left/right Arrow moves by words in a strange but useful way.
        Home/End go to begin/end of line.