Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FallenGameR opened this issue Sep 20, 2013 · 2 comments
Closed

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

FallenGameR opened this issue Sep 20, 2013 · 2 comments

Comments

@FallenGameR
Copy link

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.

@lzybkr
Copy link
Contributor

lzybkr commented Sep 20, 2013

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.

@lzybkr
Copy link
Contributor

lzybkr commented Nov 11, 2017

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants