diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-10-24 23:45:42 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-10-24 23:45:42 (GMT) |
commit | 16e3cf535b479c00875f33df2cfffbce6d2dd4d2 (patch) | |
tree | 4db109ce1f5ffcaf04e8815dde0f28354dd3f320 /Lib/idlelib/FormatParagraph.py | |
parent | 2ef7e6c8f24856aacc15bd9dc51a7ee2081547b3 (diff) | |
download | cpython-16e3cf535b479c00875f33df2cfffbce6d2dd4d2.zip cpython-16e3cf535b479c00875f33df2cfffbce6d2dd4d2.tar.gz cpython-16e3cf535b479c00875f33df2cfffbce6d2dd4d2.tar.bz2 |
format_paragraph_event(): Patch 961387 introduced a bug here, causing
the indentation of a comment block to be ignored when reformatting the
block, leading to overly long reformatted lines (too wide by an amount
equal to the indentation width). Looks like a typo in the original
patch, a 1-character repair.
Diffstat (limited to 'Lib/idlelib/FormatParagraph.py')
-rw-r--r-- | Lib/idlelib/FormatParagraph.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/FormatParagraph.py b/Lib/idlelib/FormatParagraph.py index 80c654e..ed9f28d 100644 --- a/Lib/idlelib/FormatParagraph.py +++ b/Lib/idlelib/FormatParagraph.py @@ -47,7 +47,7 @@ class FormatParagraph: lines = map(lambda st, l=len(comment_header): st[l:], lines) data = "\n".join(lines) # Reformat to maxformatwidth chars or a 20 char width, whichever is greater. - format_width = max(maxformatwidth, len(comment_header), 20) + format_width = max(maxformatwidth - len(comment_header), 20) newdata = reformat_paragraph(data, format_width) # re-split and re-insert the comment header. newdata = newdata.split("\n") |