summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2005-06-12 04:33:30 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2005-06-12 04:33:30 (GMT)
commitdf506ea98b1c9424634c6063e90a664ac9127164 (patch)
tree5e688f2b59904f167dbfc984de3c87ea3c698c87 /Lib
parent2e23e08f0444765592ded9b1bbfbefede22f1426 (diff)
downloadcpython-df506ea98b1c9424634c6063e90a664ac9127164.zip
cpython-df506ea98b1c9424634c6063e90a664ac9127164.tar.gz
cpython-df506ea98b1c9424634c6063e90a664ac9127164.tar.bz2
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
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/CREDITS.txt4
-rw-r--r--Lib/idlelib/ColorDelegator.py3
-rw-r--r--Lib/idlelib/EditorWindow.py3
-rw-r--r--Lib/idlelib/NEWS.txt4
-rw-r--r--Lib/idlelib/help.txt3
5 files changed, 13 insertions, 4 deletions
diff --git a/Lib/idlelib/CREDITS.txt b/Lib/idlelib/CREDITS.txt
index ef9c450..6f4e95d 100644
--- a/Lib/idlelib/CREDITS.txt
+++ b/Lib/idlelib/CREDITS.txt
@@ -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.
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
index 019e5d4..f258b34 100644
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -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
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index ed6b1a1..ef825f1 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -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
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 03ba114..341e241 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -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
diff --git a/Lib/idlelib/help.txt b/Lib/idlelib/help.txt
index e91e8c6..6d2ba2f 100644
--- a/Lib/idlelib/help.txt
+++ b/Lib/idlelib/help.txt
@@ -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.