GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — repl: remove lastInputPreview conditional check · nodejs/node@34ba230

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/repl
    • utils.js
  • test/parallel
    • test-repl-reverse-search.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/repl/utils.js‎

Copy file name to clipboardExpand all lines: lib/internal/repl/utils.js
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
147147
}
148148

149149
let inputPreview = null;
150-
let lastInputPreview = '';
151150

152151
let previewCompletionCounter = 0;
153152
let completionPreview = null;
@@ -179,7 +178,6 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
179178
moveCursor(repl.output, 0, rows);
180179
clearLine(repl.output);
181180
moveCursor(repl.output, 0, -rows);
182-
lastInputPreview = inputPreview;
183181
inputPreview = null;
184182
}
185183
if (completionPreview !== null) {
@@ -396,9 +394,8 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
396394

397395
wrapped = false;
398396

399-
// Ignore the output if the value is identical to the current line and the
400-
// former preview is not identical to this preview.
401-
if (line === inspected && lastInputPreview !== inspected) {
397+
// Ignore the output if the value is identical to the current line.
398+
if (line === inspected) {
402399
return;
403400
}
404401

Collapse file

‎test/parallel/test-repl-reverse-search.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-reverse-search.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ const tests = [
238238
'2\n',
239239
'\x1B[1G', '\x1B[0J',
240240
prompt, '\x1B[3G',
241-
'2', '\n// 2', '\x1B[4G', '\x1B[1A',
242-
'\x1B[1B', '\x1B[2K', '\x1B[1A',
241+
'2',
243242
'\nbck-i-search: _', '\x1B[1A', '\x1B[4G',
244243
'\x1B[3G', '\x1B[0J',
245244
'Array(100).fill(1)\nbck-i-search: r_', '\x1B[1A', '\x1B[5G',

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.