-
Notifications
You must be signed in to change notification settings - Fork 235
Cursor position is set with wrong values after finish running a git command in integrated console #1639
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
Comments
Probably need to implement |
Took a brief look at your linked PR @daxian-dbw. Is this something we'll still need to address in PSES after that PR presumably fixes it? We have a big "TODO" in PSES Internal Host to "do something" in PowerShellEditorServices/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs Lines 169 to 177 in 262aab7
|
We still need to address it in PSES because |
Summary
Cursor position contains the wrong values after the prompt comes back from running a
git
command, such asgit push
,git log
, andgit branch
. But it's fine after runninggit status
. See the screen GIF below.Please be noted that, the color of
*regex
in the prompt is different after runninggit push
,git log
andgit branch
, but the color is correct after runninggit status
. When the color of*regex
becomes different, you will observe the misplacing of cursor when typing.However, things are working fine within the default
pwsh
in the same VSCode terminal (not the integrated console). See the GIF below.The default
pwsh
is the same version as the integrated console7.2.0
, and uses the same version ofPSReadLine
.Investigation
I tried to find what's happening within PSReadLine under a debugger, and I found that, when
PSConsoleReadLine.ReadLine
gets called after finish runninggit log -1
orgit push
,cosnole.CursorLeft == 19
, even though the cursor-left looks to be at7
based on what's shown on the terminal. It looks the terminal state somehow gets corrupted after runninggit push
,git log
, orgit branch
.Environment
PSES Extension Version
PSReadLine version
The text was updated successfully, but these errors were encountered: