Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unexpected horizontal bumps on vertical cursor movement with not-narrow characters and combined characters #8944

Open
ruby3141 opened this issue Mar 19, 2024 · 0 comments

Comments

@ruby3141
Copy link

Describe the bug

Unexpected horizontal bumps on vertical cursor movement with not-narrow characters and combined characters

For the term "not-narrow", this issue mainly describes about CJK "Wide" characters and "Fullwidth variant" like Fullwidth Latin, etc.
But it seems that the tab characters also trigger this buggy behavior. #8108

To Reproduce

  • Example text

    The quick brown fox jumps over a lazy dog. the quick brown fox
    The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
    とりなくこゑす / ゆめさませ / みよあけわたる / ひんがしを / そらいろはえて / おきつへに / ほふねむれゐぬ / もやのうち
    Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich
    정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날. 정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날. 정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.
    정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날. 정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날. 정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.
    เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า
    鉴于对人类家庭所有成员的固有尊严及其平等的和不移的权利的承认,乃是世界自由、正义与和平的基础。鉴于对人类家庭所有成员的固有尊严及其平等的
    鑑於人類社會個成員儕有個固有尊嚴脫仔平等個脫仔勿移個權利承認,是世界自由、正義脫仔和平個基礎。鑑於人類社會個成員儕有個固有尊嚴脫仔平等個
    

    Each line of string is consist of characters used in

    • English, with full-width latin characters
    • English, with half-width latin characters
    • Japanese
    • German
    • Korean, with Hangul Syllables Unicode block characters
    • Korean, with Hangul Jamo Unicode block characters
    • Thai
    • Mandarin, simplified
    • Mandarin, traditional

    respectively.
    Note that for Thai and Hangul Jamo characters, some groups of Unicode characters can be combined to compose single displayed character.

  • Fonts used to create sample images
    NeoDunggeunmo for latin and korean glyph
    GNU Unifont for fallback.
    Both are 8x16 grid bitmap based monospace-ish font, so glyphs are perfectly aligned.
    (I think this will be reproducible just with Unifont.)

  • Steps

    1. Click left side of the first occuring of full-width character to put cursor.
    2. Press k/j or arrow up/down to move cursor up and down.

Expected behavior

image
Cursor should move vertically, without horizontal movement, follwing marked line on image.

Recorded on VSCode with extensions disabled.
Note that VSCode also has problem with Hangul Jamo Characters. microsoft/vscode#207794

Screenshots

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.27.2
  • VSCode version: 1.87.2
  • OS: Windows 11 23H2 22631.3296

Additional context

Foldfix partially fix this bug, but as you know, there's side effects.
Also cursor drifts toward left on unaligned part unlike vanilla VSCode.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant