Skip to content

repl: add block-based history navigation - #64477

Open
hemanth wants to merge 1 commit into
nodejs:mainfrom
hemanth:repl/block-history-nav
Open

repl: add block-based history navigation#64477
hemanth wants to merge 1 commit into
nodejs:mainfrom
hemanth:repl/block-history-nav

Conversation

@hemanth

@hemanthhemanth commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

When recalling a multiline entry from history, the Up and Down arrow
keys now navigate between history entries as whole blocks rather than
moving line-by-line within a recalled entry.

Previously, recalling a multiline function from history and pressing
Up would move the cursor within that entry's lines before advancing
to the previous history entry. With this change, Up/Down always jump
directly to the previous/next history entry, matching the behavior
of Ctrl-P/Ctrl-N.

Example

> function add(a, b) {
... return a + b;
... }
undefined
> // press Up arrow once — jumps to the full 'function add' block, not just last line

Fixes: #48146

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 13, 2026
@hemanth
hemanthforce-pushed the repl/block-history-nav branch from ffdbb59 to 35cf0f2CompareJuly 13, 2026 17:51
@codecov

codecovBot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.10%. Comparing base (9041ad0) to head (3f0786d).

Additional details and impacted files
@@ Coverage Diff @@## main #64477 +/- ##
==========================================
- Coverage 90.12% 90.10% -0.03% 
==========================================
Files 743 743 Lines 242324 242338 +14 Branches 45629 45630 +1 ==========================================
- Hits 218396 218349 -47 - Misses 15440 15498 +58 - Partials 8488 8491 +3 
Files with missing linesCoverage Δ
lib/repl.js93.00% <100.00%> (+0.07%)⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment threaddoc/api/cli.md Outdated
@avivkelleravivkeller added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 14, 2026
When recalling a multiline entry from history, the Up and Down arrow
keys now navigate between history entries as whole blocks rather than
moving line-by-line within a recalled entry.
Previously, recalling a multiline function from history and pressing
Up would move the cursor within that entry's lines before advancing
to the previous history entry. With this change, Up/Down always jump
directly to the previous/next history entry, matching the behavior
of Ctrl-P/Ctrl-N.
Fixes: nodejs#48146
Signed-off-by: hemanth <hemanth.hm@gmail.com>
@hemanth
hemanthforce-pushed the repl/block-history-nav branch from 35cf0f2 to 3f0786dCompareJuly 24, 2026 18:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.semver-majorPRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repl: history in blocks, rather than lines.

3 participants

@hemanth@nodejs-github-bot@avivkeller