comparison src/screen.c @ 24184:8ebf8b3dfc08 v8.2.2633

patch 8.2.2633: multi-byte 'fillchars' for folding do not show properly Commit: https://github.com/vim/vim/commit/196a1f740981e878091fa124a400d1fc4bfa2bb0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 21 14:39:19 2021 +0100 patch 8.2.2633: multi-byte 'fillchars' for folding do not show properly Problem: Multi-byte 'fillchars' for folding do not show properly. Solution: Handle multi-byte characters correctly. (Yegappan Lakshmanan, closes #7983, closes #7955)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Mar 2021 14:45:06 +0100
parents 90d1636a8fcb
children 8938c0c98149
comparison
equal deleted inserted replaced
24183:daea0d44aef7 24184:8ebf8b3dfc08
293 } 293 }
294 294
295 if (closed) 295 if (closed)
296 { 296 {
297 if (symbol != 0) 297 if (symbol != 0)
298 // rollback length 298 {
299 // rollback length and the character
299 byte_counter -= len; 300 byte_counter -= len;
301 if (len > 1)
302 // for a multibyte character, erase all the bytes
303 vim_memset(p + byte_counter, ' ', len);
304 }
300 symbol = fill_foldclosed; 305 symbol = fill_foldclosed;
301 len = utf_char2bytes(symbol, &p[byte_counter]); 306 len = utf_char2bytes(symbol, &p[byte_counter]);
302 byte_counter += len; 307 byte_counter += len;
303 } 308 }
304 309