Skip to content

Copy-paste of large body of code can't be interrupted #37

Closed

Description

Repro

  • copy large body of a Powershell script (~100 lines).
  • paste into the console and watch it paint itself
  • try to cancel with Ctrl+C - nothing happens, the text would still slowly appear on the screen

And pasting takes significant amount of time. You can see chars appearing one by one as if there is 100ms delay between each character render.

Activity

  1. lzybkr commented on Sep 20, 2013

    @lzybkr
    Contributor

    The perf issue is known and understood. The input is parsed and colorized after each character. Also note that tab expansion is attempted if there are any tabs in your input. This doesn't seem to slow for interactive use, but it's clearly not good when pasting a large chunk of text.

    As a workaround, I suggest you use Ctrl+V - it will be much faster. You'll also avoid the tab issue mentioned above.

    Supporting Ctrl+C while pasting will require some investigation. Right now Ctrl-C is getting queued in the input stream - if I didn't do that Ctrl+C can't be bound because I never see it.

    If there is a way to catch the paste operation (right click or from the system menu), then that would be ideal - paste shouldn't replay each key like it does today (because for example TAB ends up trying to do tab completion).

    The bottom line - this isn't a high priority item for me because Ctrl+V is a better experience. I'm leaving the item open because it should work better, muscle memory and all that.

  2. lzybkr commented on Nov 11, 2017

    @lzybkr
    Contributor

    Closing in favor of #579 which covers all of the known issues with right-click paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions