mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
vim-patch:9.1.0172: More code can use ml_get_buf_len() instead of STRLEN()
Problem: More code can use ml_get_buf_len() instead of STRLEN().
Solution: Change more STRLEN() calls to ml_get_buf_len(). Also do not
set ml_line_textlen in ml_replace_len() if "has_props" is set,
because "len_arg" also includes the size of text properties in
that case. (zeertzjq)
closes: vim/vim#14183
94b7c3233e
This commit is contained in:
@@ -957,7 +957,7 @@ retry:
|
||||
int tlen = 0;
|
||||
while (true) {
|
||||
p = (uint8_t *)ml_get(read_buf_lnum) + read_buf_col;
|
||||
int n = (int)strlen((char *)p);
|
||||
int n = ml_get_len(read_buf_lnum) - read_buf_col;
|
||||
if (tlen + n + 1 > size) {
|
||||
// Filled up to "size", append partial line.
|
||||
// Change NL to NUL to reverse the effect done
|
||||
|
Reference in New Issue
Block a user