Skip to content

Lag when pasting from terminal since 0.37 #907

@cotneit

Description

@cotneit

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 9cb1128 (#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:

Screen.Recording.2025-04-30.181705.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions