Uh oh!
There was an error while loading. Please reload this page.
repl,readline: improve unicode support and tab completion - #31288
Closed
BridgeAR wants to merge 2 commits into
Closed
repl,readline: improve unicode support and tab completion#31288BridgeAR wants to merge 2 commits into
BridgeAR wants to merge 2 commits into
Conversation
jasnell
approved these changes
Jan 10, 2020
1. This reduces the number of write operations used during tab completion. 2. The tab completion calculated the string width using the length of the string instead of using the actual width. That is fixed. 3. The key decoder is now capable of handling characters composed out of two code points. That reduces the number of "keypress" events that are emitted which again lowers the amount of writes triggered.
BridgeARforce-pushed
the
2020-01-09-readline-improvements
branch
from
January 10, 2020 08:18
2e65b26 to
a019c62CompareThis simplifies code that was more complicated than it had to be and removes code that should never be reached.
BridgeARforce-pushed
the
2020-01-09-readline-improvements
branch
from
January 10, 2020 17:46
9211679 to
23c754fCompareBridgeAR
commented
Jan 10, 2020
MemberAuthor
@jasnell I pushed another commit that cleans up some code. It would have conflicted with the former commit if I would have opened another PR for it instead. PTAL. |
nodejs-github-bot
commented
Jan 10, 2020
Collaborator
BridgeAR
commented
Jan 10, 2020
| getStringWidth(this.line[this.cursor]) > 1) { | ||
| rows++; | ||
| cols = 0; | ||
| } |
MemberAuthor
There was a problem hiding this comment.
Our cursor can't be between two code points. We move the cursor by the correct length since a while.
4 tasks
nodejs-github-bot
commented
Jan 11, 2020
Collaborator
Trott
approved these changes
Jan 11, 2020
Trott
left a comment
Member
There was a problem hiding this comment.
LGTM but I'm going to kick off a CITGM just to make sure the readline changes aren't breaking in an unexpected way.
Trott
commented
Jan 11, 2020
Member
nodejs-github-bot
commented
Jan 11, 2020
Collaborator
Trott
commented
Jan 11, 2020
Member
Landed in a523283...fe05818 |
Trott pushed a commit
that referenced
this pull request
Jan 11, 2020
1. This reduces the number of write operations used during tab completion. 2. The tab completion calculated the string width using the length of the string instead of using the actual width. That is fixed. 3. The key decoder is now capable of handling characters composed out of two code points. That reduces the number of "keypress" events that are emitted which again lowers the amount of writes triggered. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Trott pushed a commit
that referenced
this pull request
Jan 11, 2020
This simplifies code that was more complicated than it had to be and removes code that should never be reached. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit
that referenced
this pull request
Jan 16, 2020
1. This reduces the number of write operations used during tab completion. 2. The tab completion calculated the string width using the length of the string instead of using the actual width. That is fixed. 3. The key decoder is now capable of handling characters composed out of two code points. That reduces the number of "keypress" events that are emitted which again lowers the amount of writes triggered. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit
that referenced
this pull request
Jan 16, 2020
This simplifies code that was more complicated than it had to be and removes code that should never be reached. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Merged
codebytere
commented
Mar 14, 2020
Member
@BridgeAR should this go back to |
targos pushed a commit
to targos/node
that referenced
this pull request
Apr 25, 2020
1. This reduces the number of write operations used during tab completion. 2. The tab completion calculated the string width using the length of the string instead of using the actual width. That is fixed. 3. The key decoder is now capable of handling characters composed out of two code points. That reduces the number of "keypress" events that are emitted which again lowers the amount of writes triggered. PR-URL: nodejs#31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit
to targos/node
that referenced
this pull request
Apr 25, 2020
This simplifies code that was more complicated than it had to be and removes code that should never be reached. PR-URL: nodejs#31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit
that referenced
this pull request
Apr 28, 2020
1. This reduces the number of write operations used during tab completion. 2. The tab completion calculated the string width using the length of the string instead of using the actual width. That is fixed. 3. The key decoder is now capable of handling characters composed out of two code points. That reduces the number of "keypress" events that are emitted which again lowers the amount of writes triggered. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit
that referenced
this pull request
Apr 28, 2020
This simplifies code that was more complicated than it had to be and removes code that should never be reached. PR-URL: #31288 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
completion.
of the string instead of using the actual width. That is fixed.
out of two code points. That reduces the number of "keypress"
events that are emitted which again lowers the amount of writes
triggered.
This is currently blocked by #31112 (moving thecharLengthAtfunction).// cc @nodejs/repl @nodejs/readline
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes