mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit (#29793)
Problem: Wrong cursor position with 'breakindent' when a double-width
character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
(zeertzjq)
fixes: vim/vim#15289
closes: vim/vim#15290
b5d6b5caac
This commit is contained in:
@@ -268,7 +268,7 @@ CharSize charsize_regular(CharsizeArg *csarg, char *const cur, colnr_T const vco
|
||||
head += (max_head_vcol - (vcol + head_prev + prev_rem)
|
||||
+ width2 - 1) / width2 * head_mid;
|
||||
} else if (max_head_vcol < 0) {
|
||||
int off = virt_text_cursor_off(csarg, *cur == NUL);
|
||||
int off = mb_added + virt_text_cursor_off(csarg, *cur == NUL);
|
||||
if (off >= prev_rem) {
|
||||
if (size > off) {
|
||||
head += (1 + (off - prev_rem) / width) * head_mid;
|
||||
|
Reference in New Issue
Block a user