nushell / nushell/reedline

Lag when pasting from terminal since 0.37

Open
#907 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
817
Forks
247
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Platform: Windows 11
Terminal software: Windows Terminal, Wezterm

Since nushell 0.100.0 / reedline 0.37 there is noticeable lag when pasting is handled by terminal instead of nushell. PasteSystem from (system-clipboard feature) and PasteCutBufferBefore are not affected.

This is most noticeable when pasting URLs because paste happens in two stages, e.g. when pasting https://github.com/: first the part of URL till colon appears immediately (https:), delay, and then //github.com/ appears.

When colon is not involved, paste happens in a single stage, and lag seems to always happen when pasting more than 5 characters, pasting less than 5 characters always seems fine.

When colon is involved, lag happens when there are more than 5 characters on either side of the colon, and which side exceeds this limit affects when lag happens. When part before column exceeds it - lag happens immediately, when part after column exceeds it - paste happens in two stages (see URL example above), and lag happens after colon.

I narrowed this down to 9cb1128aaab8f5c19ec37b94ac1a86a91915827f (https://github.com/nushell/reedline/pull/846), before it the issue is not present.

Steps to reproduce

  1. In nushell, paste https://github.com/ from system clipboard without using PasteSystem keybind / system-clipboard feature

Screenshots/Screencaptures

Recording doesn't always catch this, but it happens on every paste:

https://github.com/user-attachments/assets/83761d03-901c-4134-900b-75a9bf04f3c8

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 by comparing reedline at commit 9cb1128aaab8f5c19ec37b94ac1a86a91915827f with the preceding version and reproduce the paste in Nushell on Windows Terminal or WezTerm. Test URLs and strings over five characters, including text with a colon; done means terminal-handled pastes no longer show the reported delay or split into stages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.