zsh-syntax-highlighting icon indicating copy to clipboard operation
zsh-syntax-highlighting copied to clipboard

Cursor briefly jumps to the start of the line (Windows only)

Open HernandoR opened this issue 4 years ago • 10 comments

Cursor sways with this plugin,

I currently using MSYS2 in windows 10 with oh-my-zsh.

However, the Cursor will automatically change to the head of the line and then run back where it should be every time I tap the first few letters.

Such thing only happens with this plugin opened, and when I using windows terminal, If I use MSYS2 directly, it does not occur or I haven't noticed.

HernandoR avatar Dec 26 '20 15:12 HernandoR

Seems like it's related to ConPTY winpty/mintty are not affected I faced same issue in any terminal with conpty backend (WIndows terminal/Alacritty/VS Code terminal)

wight554 avatar Apr 19 '21 20:04 wight554

There's related issue in conpty itself https://github.com/microsoft/terminal/issues/364 But seems like it's dead

wight554 avatar Apr 19 '21 20:04 wight554

@wight554 Thanks!

@HernandoR Does the referenced issue describe your setup too?

If so, we should probably close this ticket as an upstream bug?

danielshahaf avatar Apr 19 '21 23:04 danielshahaf

Uh that's an actual nightmare MS guys lost that ticket perhaps, it's been 2 years since the last update If nothing can be don't from plugin side, then there's no choice other than closing ticket

wight554 avatar Apr 19 '21 23:04 wight554

zsh-syntax-highlighting doesn't do anything related to positioning the cursor. zle (part of zsh) might, so you might try asking zsh-users@ with a minimal reproducer (one that's written in zsh -f and doesn't source anything).

danielshahaf avatar Apr 20 '21 12:04 danielshahaf

Well it happens only with this (or fsyh) plugin enabled Issue I linked higher has repro steps

wight554 avatar Apr 20 '21 12:04 wight554

Well it happens only with this (or fsyh) plugin enabled Issue I linked higher has repro steps

I've seen that, but I stand by my recommendation to come up with a minimal reproducer, as outlined above — or, at least, as minimal as practicable.

danielshahaf avatar Apr 20 '21 19:04 danielshahaf

I'm having this same issue, but I thought I would contribute with gif demonstrations, since this problem is kind of hard to describe.

Mintty: with z-s-h, no z-s-h WinTerm: with z-s-h, no z-s-h

I can confirm that the WinTerm behavior is identical in VS Code's integrated terminal.

This is an extremely niche use case (how many people are using zsh-syntax-highlighting on Windows?), so it's probably not a very high priority, and it's just barely noticeable enough to be distracting, but I thought I'd try to document the behavior, in case that's at all helpful.

Version Information z-s-h: 0.8.0-alpha2-dev zsh: 5.8 (x86_64-pc-cygwin) Cygwin: 3.3.4 WinTerm: 1.11.3471.0 Mintty: 3.6.0 VS Code: 1.66.0

chrstophr-wltrs avatar Apr 01 '22 15:04 chrstophr-wltrs

@chrstophr-wltrs Thanks, that's very helpful. Could you upload the gifs as attachments to your next comment, please? See instructions at the bottom of the textarea comments are entered in.

danielshahaf avatar Apr 10 '22 18:04 danielshahaf

Yes, absolutely! Sorry about that, I've updated the links in my first post to point to images hosted on Github instead of gfycat.

chrstophr-wltrs avatar Apr 15 '22 03:04 chrstophr-wltrs