repl: add completion preview by BridgeAR · Pull Request #30907 · nodejs/node
BridgeAR
added
the
semver-minor
label
Dec 11, 2019
Trott
added
the
author ready
label
Dec 13, 2019The .scope command was used only in the old debugger. Since that's not part of core anymore it's does not have any use. I tried to replicate the expected behavior but it even results in just exiting the repl immediately when using the completion similar to the removed test case.
This simplifies calling `filteredOwnPropertyNames()`. The context is not used in that function, so there's no need to call the function as such.
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020The .scope command was used only in the old debugger. Since that's not part of core anymore it's does not have any use. I tried to replicate the expected behavior but it even results in just exiting the repl immediately when using the completion similar to the removed test case. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This simplifies calling `filteredOwnPropertyNames()`. The context is not used in that function, so there's no need to call the function as such. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This simplifies some repl code and removes a code branch that is unreachable. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This updates the used regular expression to the latest version. It includes a number of additional escape codes. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This renames some variables for clarity and moves the common substring part into a shared file. One algorithm was more efficient than the other but the functionality itself was identical. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This just refactors code without changing the behavior. Especially the REPL code is difficult to read and deeply indented. This reduces the indentation to improve that. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This improves the completion output by removing the nested special handling. It never fully worked as expected and required a lot of hacks to even keep it working halfway reliable. Our tests did not cover syntax errors though and those can not be handled by this implementation. Those break the layout and confuse the REPL. Besides that the completion now also works in case the current line has leading whitespace. Also improve the error output in case the completion fails. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This improves the already existing preview functionality by also checking for the input completion. In case there's only a single completion, it will automatically be visible to the user in grey. If colors are deactivated, it will be visible as comment. This also changes some keys by automatically accepting the preview by moving the cursor behind the current input end. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This addresses an issue that is caused by lines that exceed the current window columns. That would cause the preview to confuse the REPL. This is meant as hot fix. The preview should be able to handle these cases appropriately as well later on. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This improves the coverage for the preview feature signficantly. Quite a few edge cases get testet here to prevent regressions. PR-URL: nodejs#30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020The .scope command was used only in the old debugger. Since that's not part of core anymore it's does not have any use. I tried to replicate the expected behavior but it even results in just exiting the repl immediately when using the completion similar to the removed test case. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This simplifies calling `filteredOwnPropertyNames()`. The context is not used in that function, so there's no need to call the function as such. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This simplifies some repl code and removes a code branch that is unreachable. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This updates the used regular expression to the latest version. It includes a number of additional escape codes. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This renames some variables for clarity and moves the common substring part into a shared file. One algorithm was more efficient than the other but the functionality itself was identical. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This just refactors code without changing the behavior. Especially the REPL code is difficult to read and deeply indented. This reduces the indentation to improve that. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This improves the completion output by removing the nested special handling. It never fully worked as expected and required a lot of hacks to even keep it working halfway reliable. Our tests did not cover syntax errors though and those can not be handled by this implementation. Those break the layout and confuse the REPL. Besides that the completion now also works in case the current line has leading whitespace. Also improve the error output in case the completion fails. PR-URL: #30907 Reviewed-By: Michaël Zasso <targos@protonmail.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