diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-06-01 19:23:00 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2018-06-01 19:23:00 -0400 |
commit | 29996a1c4e8bd6dde6adce2b44d11a0982a47a3a (patch) | |
tree | c6f08943343b54a41e9ed3da85a15325819aebf0 /Lib/idlelib/configdialog.py | |
parent | 6854e803b73ac4d02ba160d514b8a53dd7a62905 (diff) | |
download | cpython-git-29996a1c4e8bd6dde6adce2b44d11a0982a47a3a.tar.gz |
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
Instead of displaying a fixed number of lines, some blank, Code Context
now displays the variable number of actual context lines. When there
are no context lines, it shows a single blank line to indicate that the
feature is turned on.
The Code Context configuration option is changed from 'numlines'
(default 3) to 'maxlines' (default 15) to avoid possible interference
between user settings for the old and new versions of Code Context.
Diffstat (limited to 'Lib/idlelib/configdialog.py')
-rw-r--r-- | Lib/idlelib/configdialog.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 36ac4a23a5..28ad458639 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -1843,7 +1843,7 @@ class GenPage(Frame): self.format_width = tracers.add( StringVar(self), ('extensions', 'FormatParagraph', 'max-width')) self.context_lines = tracers.add( - StringVar(self), ('extensions', 'CodeContext', 'numlines')) + StringVar(self), ('extensions', 'CodeContext', 'maxlines')) # Create widgets: # Section frames. @@ -1910,7 +1910,7 @@ class GenPage(Frame): frame_format, textvariable=self.format_width, width=4) frame_context = Frame(frame_editor, borderwidth=0) - context_title = Label(frame_context, text='Context Lines :') + context_title = Label(frame_context, text='Max Context Lines :') self.context_int = Entry( frame_context, textvariable=self.context_lines, width=3) @@ -2012,7 +2012,7 @@ class GenPage(Frame): self.format_width.set(idleConf.GetOption( 'extensions', 'FormatParagraph', 'max-width', type='int')) self.context_lines.set(idleConf.GetOption( - 'extensions', 'CodeContext', 'numlines', type='int')) + 'extensions', 'CodeContext', 'maxlines', type='int')) # Set additional help sources. self.user_helplist = idleConf.GetAllExtraHelpSourcesList() @@ -2204,6 +2204,9 @@ ParenMatch: Style indicates what is highlighted when closer is entered: 'opener' - opener '({[' corresponding to closer; 'parens' - both chars; 'expression' (default) - also everything in between. Flash-delay is how long to highlight if cursor is not moved (0 means forever). + +CodeContext: Maxlines is the maximum number of code context lines to +display when Code Context is turned on for an editor window. ''' } |