summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
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/idlelib/EditorWindow.py
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/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py3
1 files changed, 2 insertions, 1 deletions
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