Skip to content
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

Wrong cursor position in intergrated terminal with speical character left of prompt #51739

Closed
OpportunityLiu opened this issue Jun 13, 2018 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@OpportunityLiu
Copy link

Issue Type: Bug

  1. Install posh-git
  2. Open powershell in intergrated terminal
  3. Run Import-Module posh-git
  4. Set working directory to a git folder to show the git status in prompt
  5. Input any command with space, i.e. ls . -Recurse, the cursor position is wrong
    1

VS Code version: Code 1.24.0 (6a6e02c, 2018-06-06T17:35:40.560Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2592)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled
Memory (System) 7.83GB (2.94GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%
Extensions (19)
Extension Author (truncated) Version
gitignore cod 0.5.0
vscode-eslint dba 1.4.12
githistory don 0.4.1
xml Dot 2.3.0
vscode-html-css ecm 0.2.0
tslint eg2 1.0.30
docker-explorer for 0.1.6
matlab Gim 0.9.0
rainbow-csv mec 0.4.1
vscode-language-pack-zh-hans MS- 1.24.3
cpptools ms- 0.17.4
csharp ms- 1.15.2
PowerShell ms- 1.7.0
vscode-docker Pet 0.0.27
code-settings-sync Sha 2.9.2
hosts tom 0.0.8
gitblame wad 2.4.2
vscode-cil-complete wk- 0.0.5
markdown-all-in-one yzh 1.4.0
@vscodebot
Copy link

vscodebot bot commented Jun 13, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@OpportunityLiu
Copy link
Author

It seems there is something wrong with character , the following step also reproduces:

C:\> mkdir ≡
C:\> cd ≡
C:\≡> ls . -Recurse

@OpportunityLiu OpportunityLiu changed the title Wrong cursor position in intergrated terminal with posh-git Wrong cursor position in intergrated terminal with speical character left of prompt Jun 13, 2018
@RMacfarlane RMacfarlane added terminal General terminal issues that don't fall under another label and removed new release labels Jun 13, 2018
@yume-chan
Copy link
Contributor

I can't reproduce this problem with the mkdir ≡ way in both 1.24.0 and 1.25.0-insider.

1

(In the gif the terminal.integrated.cursorStyle is line, but I also tried with block)

@Tyriar
Copy link
Member

Tyriar commented Jun 13, 2018

I'm guessing this is related to ambiguous character width, see xtermjs/xterm.js#1467

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Jun 13, 2018
@OpportunityLiu
Copy link
Author

OpportunityLiu commented Jun 13, 2018

@yume-chan
Can reproduce on 3 different computers.
Are you using powershell on windows?

@Tyriar
Tried again with "terminal.integrated.rendererType": "dom".
There is also a redundant <span> <span>
1

@yume-chan
Copy link
Contributor

yume-chan commented Jun 13, 2018

Are you using powershell on windows?

Yes, I'm using Windows 10 1803 x64 in English, PowerShell, and I'm also using posh-git.

@Tyriar
Copy link
Member

Tyriar commented Sep 17, 2018

This is likely related to winpty, tracking in #45693

@Tyriar Tyriar closed this as completed Sep 17, 2018
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants