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

The behavior when specifying 2 for setcellwidths is different between the GUI version and the CUI version. #14539

Closed
mikoto2000 opened this issue Apr 13, 2024 · 0 comments
Labels

Comments

@mikoto2000
Copy link
Contributor

Steps to reproduce

  1. Create the following file as test.txt.
    0x279c:
    ➜➜➜➜➜
  2. Open a file in vim
    vim -u NONE -N ./test.txt
  3. Set character code and cell width
    set encoding=utf-8
    call setcellwidths([[0x279c, 0x279c, 2]])
    

Expected behaviour

Same behavior as GUI version.

GUI:
320875565-7a624485-fe37-411e-9ce5-a6563752c5ce

CUI:
320875299-229a17da-2cfb-45c3-9763-1c4d7b3863e8
※ Text is drawn up to the yellow arrow, but the cursor moves to the green arrow.

Version of Vim

9.1.309

Environment

We have confirmed that this happens in the following three environments

Environment1:

  • OS: Windows 11 Pro 64bit build 22631.3296
  • Terminal: Windows Terminal
  • $TERM: N/A

Environment2:

  • OS: Ubuntu 22.04 on WSL2 on Windows 11 Pro 64bit build 22631.3296
  • Terminal: mintty(wsltty)
  • $TERM: /bin/bash

Environment3:

  • OS Ubuntu 22.04
  • Terminal: gnome-terminal
  • $TERM: /bin/bash

Logs and stack traces

No response

@mikoto2000 mikoto2000 added the bug label Apr 13, 2024
zeertzjq added a commit to zeertzjq/neovim that referenced this issue Apr 17, 2024
Problem:  Cursor wrong after using setcellwidth() in terminal
          (mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
          (mikoto2000)

fixes: vim/vim#14539
closes: vim/vim#14540

Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.

vim/vim@e20fa59

This is already fixed and tested in Nvim in neovim#28322.

Co-authored-by: mikoto2000 <mikoto2000@gmail.com>
zeertzjq added a commit to neovim/neovim that referenced this issue Apr 17, 2024
…al (#28391)

Problem:  Cursor wrong after using setcellwidth() in terminal
          (mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
          (mikoto2000)

fixes: vim/vim#14539
closes: vim/vim#14540

Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.

vim/vim@e20fa59

This is already fixed and tested in Nvim in #28322.

Co-authored-by: mikoto2000 <mikoto2000@gmail.com>
huangyingw pushed a commit to huangyingw/neovim that referenced this issue May 31, 2024
…al (neovim#28391)

Problem:  Cursor wrong after using setcellwidth() in terminal
          (mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
          (mikoto2000)

fixes: vim/vim#14539
closes: vim/vim#14540

Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.

vim/vim@e20fa59

This is already fixed and tested in Nvim in neovim#28322.

Co-authored-by: mikoto2000 <mikoto2000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant