summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/EditorWindow.py4
-rw-r--r--Misc/NEWS2
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 565cf367e2..148a1daaa0 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1433,6 +1433,7 @@ class EditorWindow(object):
def tabify_region_event(self, event):
head, tail, chars, lines = self.get_region()
tabwidth = self._asktabwidth()
+ if tabwidth is None: return
for pos in range(len(lines)):
line = lines[pos]
if line:
@@ -1444,6 +1445,7 @@ class EditorWindow(object):
def untabify_region_event(self, event):
head, tail, chars, lines = self.get_region()
tabwidth = self._asktabwidth()
+ if tabwidth is None: return
for pos in range(len(lines)):
lines[pos] = lines[pos].expandtabs(tabwidth)
self.set_region(head, tail, chars, lines)
@@ -1537,7 +1539,7 @@ class EditorWindow(object):
parent=self.text,
initialvalue=self.indentwidth,
minvalue=2,
- maxvalue=16) or self.tabwidth
+ maxvalue=16)
# Guess indentwidth from text content.
# Return guessed indentwidth. This should not be believed unless
diff --git a/Misc/NEWS b/Misc/NEWS
index 33cabc3877..d1fc765131 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1013,6 +1013,8 @@ _ Issue #17385: Fix quadratic behavior in threading.Condition. The FIFO
IDLE
----
+- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
+
- Issue #14254: IDLE now handles readline correctly across shell restarts.
- Issue #17614: IDLE no longer raises exception when quickly closing a file.