Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Fix #170 by not using ANSI DSR on every key press #174

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

stbenjam
Copy link
Contributor

Instead of using the ANSI DSR escape code on every key press, only do it
once at the beginning of reading input, and keep track of cursor
location ourselves.

In the examples below pasting some text, the speed improvement is dramatic.

Before:

slow

After:

fast

Instead of using the ANSI DSR escape code on every key press, only do it
once at the beginning of reading input, and keep track of cursor
location ourselves.
@AlecAivazis
Copy link
Owner

Awesome! Thanks for the contribution 🎉 I'm going to give this a swing on my windows machine to make sure everything works there. Will let you know how that goes

@AlecAivazis
Copy link
Owner

Alright cool this seems to be working just fine. Sorry for the wait!

@AlecAivazis AlecAivazis merged commit 49e2fbe into AlecAivazis:master Jan 23, 2019
@stbenjam
Copy link
Contributor Author

No worries, thank you for looking!

@stbenjam stbenjam deleted the faster branch January 23, 2019 12:34
abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request Jan 29, 2019
…constraint

e1f28c2 moved to revision from a version to being in [1].
But a new release [2] includes the change from [1].

So switching back to version for dep constraint.

[1] AlecAivazis/survey#174
abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request Jan 29, 2019
…constraint

e1f28c2 moved to revision from a version to being in [1].
But a new release [2] includes the change from [1].

So switching back to version for dep constraint.

[1] AlecAivazis/survey#174
[2] https://github.com/AlecAivazis/survey/releases/tag/v1.8.1
siredmar pushed a commit to siredmar/survey that referenced this pull request Feb 20, 2020
…azis#174)

Instead of using the ANSI DSR escape code on every key press, only do it
once at the beginning of reading input, and keep track of cursor
location ourselves.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants