summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/FormatParagraph.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-12-16 08:21:19 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-12-16 08:21:19 (GMT)
commit16e093db989f112353fc7c244ef549f279934c21 (patch)
tree55030a59fe455928d7dfb08133c9e94e27de1a4d /Lib/idlelib/FormatParagraph.py
parent3004b409938fe2e1bed4a25a43f36442865a7265 (diff)
downloadcpython-16e093db989f112353fc7c244ef549f279934c21.zip
cpython-16e093db989f112353fc7c244ef549f279934c21.tar.gz
cpython-16e093db989f112353fc7c244ef549f279934c21.tar.bz2
Issue #20577: move configuration of FormatParagraph extension to new extension
configuration dialog. Patch by Tal Einat.
Diffstat (limited to 'Lib/idlelib/FormatParagraph.py')
-rw-r--r--Lib/idlelib/FormatParagraph.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/FormatParagraph.py b/Lib/idlelib/FormatParagraph.py
index 9b10c0a..7a9d185 100644
--- a/Lib/idlelib/FormatParagraph.py
+++ b/Lib/idlelib/FormatParagraph.py
@@ -44,9 +44,11 @@ class FormatParagraph:
The length limit parameter is for testing with a known value.
"""
- if limit == None:
+ if limit is None:
+ # The default length limit is that defined by pep8
limit = idleConf.GetOption(
- 'main', 'FormatParagraph', 'paragraph', type='int')
+ 'extensions', 'FormatParagraph', 'max-width',
+ type='int', default=72)
text = self.editwin.text
first, last = self.editwin.get_selection_indices()
if first and last: