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

Terminal: option+click off by ~3 characters #148061

Closed
collinanderson opened this issue Apr 25, 2022 · 5 comments · Fixed by #150413
Closed

Terminal: option+click off by ~3 characters #148061

collinanderson opened this issue Apr 25, 2022 · 5 comments · Fixed by #150413
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. verified Verification succeeded
Milestone

Comments

@collinanderson
Copy link

Issue Type: Bug

In the regular MacOS terminal (outside Visual Studio Code), option+click will move the cursor to a given point in the text. This is nice for editing the middle of a long command line, or for moving around vim.

However, when the MacOS Terminal is being run inside Visual Studio Code, when I option+click text, the cursor moves close to where I clicked, but it's off by about 3 characters.

VS Code version: Code 1.63.2 (899d46d, 2021-12-15T09:38:17.605Z)
OS version: Darwin arm64 21.1.0
Restricted Mode: No
Remote OS version: Linux x64 5.4.0-105-generic

System Info
Item Value
CPUs Apple M1 Pro (10 x 24)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 1, 2, 2
Memory (System) 16.00GB (0.47GB free)
Process Argv --crash-reporter-id e3955928-6bb2-4744-a03c-d22a56f2c7b0
Screen Reader no
VM 0%
Item Value
Remote SSH: ***
OS Linux x64 5.4.0-105-generic
CPUs AMD EPYC 7542 32-Core Processor (4 x 2899)
Memory (System) 7.77GB (3.09GB free)
VM 0%
Extensions (4)
Extension Author (truncated) Version
remote-ssh ms- 0.70.0
python ms- 2022.4.1
vscode-pylance ms- 2022.4.2
references-view ms- 0.0.89
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member labels Apr 25, 2022
@meganrogge meganrogge added this to the Backlog milestone Apr 25, 2022
@meganrogge meganrogge added the terminal Integrated terminal issues label Apr 25, 2022
@Tyriar
Copy link
Member

Tyriar commented May 4, 2022

Guessing this is related to padding on .xterm

@Tyriar Tyriar added terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. and removed terminal Integrated terminal issues labels May 4, 2022
@Tyriar Tyriar modified the milestones: Backlog, May 2022 May 4, 2022
@Tyriar Tyriar added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 4, 2022
@meganrogge meganrogge removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 4, 2022
@meganrogge
Copy link
Contributor

Does not reproduce in the xterm.js demo

@Tyriar
Copy link
Member

Tyriar commented May 4, 2022

@meganrogge VS Code uses padding but the demo doesn't, try adding .xterm { padding-left: 20px } to xterm.css

@meganrogge
Copy link
Contributor

meganrogge commented May 4, 2022

shouldn't the padding be on the cursor layer?

nvm made the change in the wrong xterm.css

@Tyriar
Copy link
Member

Tyriar commented May 4, 2022

I think this rule is the problem but haven't looked into it:

image

We recently moved the padding from .terminal-wrapper to .terminal I think which would explain the regression

Tyriar added a commit to Tyriar/xterm.js that referenced this issue May 23, 2022
@Tyriar Tyriar changed the title MacOS Terminal: option+click off by ~3 characters Terminal: option+click off by ~3 characters May 25, 2022
Tyriar added a commit that referenced this issue May 25, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 25, 2022
@meganrogge meganrogge added the verified Verification succeeded label Jun 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2022
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
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 confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants