Pasting multi-line functions repeats their lines pointlessly
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, nodejs
- Domínio
- cli
Direção de pesquisa
The bug is in the REPL's multi-line input redraw on Windows, so start in lib/repl.js and the readline-based line refresh logic that re-renders the buffer as the user pastes. Reproduce by pasting the multi-line Fib snippet into node on Windows and confirm the duplicated prompt lines. Done means the pasted function is echoed once per line with no repeated lines, and a test under test/parallel for REPL output passes.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Version
v26.13.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
No response
What steps will reproduce the bug?
- Open Node.
- Paste:
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
if(!Number.isInteger(I)||I<0)return'Please enter a positive integer or zero!'
if(I===0||I===1)return I
let a=0,b=1,c;--I;do{c=a+b;a=b;b=c}while(--I!==0)// # iterations = I-1
return c
}// e.g. Fib(7) //➜ 13 , Fib(8) //➜ 21 , Fib(9) //➜ 34
You'll see that it looks like this:
node
Welcome to Node.js v26.13.0.
Type ".help" for more information.
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
or zero!'
| if(I===0||I===1)return I
| let a=0,b=1,c;--I;do{c=a+b;a=b;b=c}while(--I!==0)// # iterations = I-1
| return c
| }// e.g. Fib(7) //➜ 13 , Fib(8) //➜ 21 , Fib(9) //➜ 34
[Function: Fib]
How often does it reproduce? Is there a required condition?
It happens every time.
What is the expected behavior? Why is that the expected behavior?
I expect it to work the way that it did in past versions of Node and also as the DevTools console works. Not repeat the same line like 5 times.
What do you see instead?
Lines being repeated, 3 times, 5 times, etc.
Additional information
No response
- Linguagem predominante
- JavaScript
- Estrelas
- 124k
- Forks
- 38k
- Merge médio
- 4d 2h
- PRs com merge (30d)
- 266
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nodejs/node
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
Mantenedores costumam responder em até 1 dia
-
fs: document readStream.start and readStream.endTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertadoc
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
nodejs/node#67848 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
doc: document the Buffer.prototype.*Slice() methodsTalvez já em andamento @AyushCipher assumiu hoje. Abertadoc
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
nodejs/node#67847 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
`styleText` fast path bypasses `options` and `options.validateStream` validationTalvez já em andamento @GBra-4-669 assumiu há 8 dias. Abertautil
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
riscv64
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
nodejs/node#67655 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de nodejs/node
Issues semelhantes
-
bug triage needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
[Resource]: PersephoneAbertaresource-submission validation-passed
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
hesreallyhim/awesome-claude-code#3773 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
tabatkins/railroad-diagrams#129 ·
-
web: api() turns a null or object-valued error body into a TypeError or "[object Object]" and loses the statusTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia