Skip to content

Commit c0381aa

Browse files
csabellaterryjreedy
authored andcommitted
bpo-28097: IDLE - Add Previous/Next History to Shell menu (#11325)
1 parent 804a5d9 commit c0381aa

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

Doc/library/idle.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ View Last Restart
235235
Restart Shell
236236
Restart the shell to clean the environment.
237237

238+
Previous History
239+
Cycle through earlier commands in history which match the current entry.
240+
241+
Next History
242+
Cycle through later commands in history which match the current entry.
243+
238244
Interrupt Execution
239245
Stop a running program.
240246

Lib/idlelib/help.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ <h3>Shell menu (Shell window only)<a class="headerlink" href="#shell-menu-shell-
273273
<dd>Scroll the shell window to the last Shell restart.</dd>
274274
<dt>Restart Shell</dt>
275275
<dd>Restart the shell to clean the environment.</dd>
276+
<dt>Previous History</dt>
277+
<dd>Cycle through earlier commands in history which match the current entry.</dd>
278+
<dt>Next History</dt>
279+
<dd>Cycle through later commands in history which match the current entry.</dd>
276280
<dt>Interrupt Execution</dt>
277281
<dd>Stop a running program.</dd>
278282
</dl>
@@ -309,22 +313,20 @@ <h3>Options menu (Shell and Editor)<a class="headerlink" href="#options-menu-she
309313
configuration dialog by selecting Preferences in the application
310314
menu. For more, see
311315
<a class="reference internal" href="#preferences"><span class="std std-ref">Setting preferences</span></a> under Help and preferences.</dd>
312-
<dt>Code Context (toggle)(Editor Window only)</dt>
316+
<dt>Zoom/Restore Height</dt>
317+
<dd>Toggles the window between normal size and maximum height. The initial size
318+
defaults to 40 lines by 80 chars unless changed on the General tab of the
319+
Configure IDLE dialog.</dd>
320+
<dt>Show/Hide Code Context (Editor Window only)</dt>
313321
<dd>Open a pane at the top of the edit window which shows the block context
314322
of the code which has scrolled above the top of the window. See
315323
<a class="reference internal" href="#code-context"><span class="std std-ref">Code Context</span></a> in the Editing and Navigation section below.</dd>
316324
</dl>
317325
</div>
318326
<div class="section" id="window-menu-shell-and-editor">
319327
<h3>Window menu (Shell and Editor)<a class="headerlink" href="#window-menu-shell-and-editor" title="Permalink to this headline"></a></h3>
320-
<dl class="docutils">
321-
<dt>Zoom Height</dt>
322-
<dd>Toggles the window between normal size and maximum height. The initial size
323-
defaults to 40 lines by 80 chars unless changed on the General tab of the
324-
Configure IDLE dialog.</dd>
325-
</dl>
326-
<p>The rest of this menu lists the names of all open windows; select one to bring
327-
it to the foreground (deiconifying it if necessary).</p>
328+
<p>Lists the names of all open windows; select one to bring it to the foreground
329+
(deiconifying it if necessary).</p>
328330
</div>
329331
<div class="section" id="help-menu-shell-and-editor">
330332
<h3>Help menu (Shell and Editor)<a class="headerlink" href="#help-menu-shell-and-editor" title="Permalink to this headline"></a></h3>
@@ -918,7 +920,7 @@ <h3>Navigation</h3>
918920
<br />
919921
<br />
920922

921-
Last updated on Dec 20, 2018.
923+
Last updated on Dec 28, 2018.
922924
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
923925
<br />
924926

Lib/idlelib/mainmenu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
('_View Last Restart', '<<view-restart>>'),
8383
('_Restart Shell', '<<restart-shell>>'),
8484
None,
85+
('_Previous History', '<<history-previous>>'),
86+
('_Next History', '<<history-next>>'),
87+
None,
8588
('_Interrupt Execution', '<<interrupt-execution>>'),
8689
]),
8790

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add Previous/Next History entries to Shell menu.

0 commit comments

Comments
 (0)