-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
vim-patch:8.2.{1535,1537,3545}: setcellwidths() #19674
Conversation
Thx for rebasing. Now Neovim's view is broken which Vim can draw validly. I confirmed this on this PR & my one (#13883). # ℃ <- 0x2103
$ cat /tmp/aaa.txt
'℃' on Neovim $ nvim -N -u NONE -i NONE --noplugin +'call setcellwidths([[0x2103, 0x2103, 2]])' /tmp/aaa.txt $ vim +'call setcellwidths([[0x2103, 0x2103, 2]])' /tmp/aaa.txt On Neovim, it puts |
I think this is likely because Nvim's TUI is line-based, while Vim's TUI is char-based. Does iTerm2 also behave like this if you |
|
If performance is not taken into consideration, you may fix this problem by making this small change: diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index e2289eb9c..78281470d 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -788,6 +788,7 @@ static void cursor_goto(UI *ui, int row, int col)
{
TUIData *data = ui->data;
UGrid *grid = &data->grid;
+ goto safe_move;
if (row == grid->row && col == grid->col) {
return;
} This change is not desirable as it disables a bunch of performance improvements. |
This just avoids including mbyte.h in eval/typval.h, so that mbyte.h can include eval/typval.h in Vim patch 8.2.1535.
…acters Problem: It is not possible to specify cell widths of characters. Solution: Add setcellwidths(). vim/vim@08aac3c Co-Authored-By: delphinus <me@delphinus.dev>
Problem: Memory acccess error when using setcellwidths(). Solution: Use array and pointers correctly. vim/vim@b06a6d5
…s' invalid Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid. Solution: Check the value and give an error. (closes vim/vim#9024) vim/vim@94358a1 Cherry-pick f_setcellwidths() change from patch 9.0.0036. Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
I have a solution to the problem mentioned above in #19686. |
vim-patch:8.2.1535: it is not possible to specify cell widths of characters
Problem: It is not possible to specify cell widths of characters.
Solution: Add setcellwidths().
vim/vim@08aac3c
Co-Authored-By: delphinus me@delphinus.dev
vim-patch:8.2.1537: memory acccess error when using setcellwidths()
Problem: Memory acccess error when using setcellwidths().
Solution: Use array and pointers correctly.
vim/vim@b06a6d5
vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid
Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution: Check the value and give an error. (closes vim/vim#9024)
vim/vim@94358a1
Cherry-pick f_setcellwidths() change from patch 9.0.0036.
Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.