python / python/cpython

IDLE: More code_context improvements

Open
#95,352 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-IDLE type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Continuation of #77791. Below is https://github.com/python/cpython/issues/77791#issuecomment-1093786893 with done items removed. Items need to be checked or decided on if still relevant. New items should continue with next new number on original.

Docs:

  • D3

Menu

  • M4: Shortcut for CC? (new)

Code Context Display

  • C1. Add vertical scrollbar if lines > maxlines (12).
  • C2. Add horizontal scrollbar if add to text (13).
  • C3: Make 'Show' show the context for the current top visible line (new).
  • C5

Internal Changes

  • I3

External Changes

  • E2. Navigate by blocks in editor (14).
  • E4. Max context lines = 0 is treated as infinity. For depth 0, "self.info[-self.context_depth:]" is whole slice. I don't remember if this is intended (if one does not want context, don't toggle it on), but it is not documented in settings help or doc section. In any case, offset = max(1, lines - self.context_depth) - 1 fails with depth 0.
  • E5. test_codecontext is affected by user customization, but should not be.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with issue #77791 and its linked comment, then inspect IDLE's code context display, menu, and editor entry points. Run or read test_codecontext and review the settings help and documentation references. Done means each listed item is checked or decided, with the documented behavior and affected tests aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.