Skip to content

Commit

Permalink
fixup! repl: fix disruptive autocomplete without inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkgoron committed Jan 31, 2022
1 parent 0495607 commit fa45fb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/repl/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function isRecoverableError(e, code) {

function setupPreview(repl, contextSymbol, bufferSymbol, active) {
// Simple terminals can't handle previews.
if (process.env.TERM === 'dumb' || !active || !process.features.inspector) {
if (process.env.TERM === 'dumb' || !active) {
return { showPreview() {}, clearPreview() {} };
}

Expand Down Expand Up @@ -367,7 +367,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {

const showPreview = () => {
// Prevent duplicated previews after a refresh.
if (inputPreview !== null || !repl.isCompletionEnabled) {
if (inputPreview !== null || !repl.isCompletionEnabled || !process.features.inspector) {
return;
}

Expand Down

0 comments on commit fa45fb5

Please sign in to comment.