mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Merge pull request #14528 from disrupted/fix/nvim_buf_set_lines
Fix nvim_buf_set_lines
This commit is contained in:
commit
133351cbf8
@ -516,7 +516,7 @@ void nvim_buf_set_lines(uint64_t channel_id,
|
||||
kExtmarkNOOP);
|
||||
|
||||
extmark_splice(curbuf, (int)start-1, 0, (int)(end-start), 0,
|
||||
deleted_bytes, (int)(end+extra-1), 0, inserted_bytes,
|
||||
deleted_bytes, (int)new_len, 0, inserted_bytes,
|
||||
kExtmarkUndo);
|
||||
|
||||
changed_lines((linenr_T)start, 0, (linenr_T)end, (long)extra, true);
|
||||
|
@ -6307,7 +6307,7 @@ bcount_t get_region_bytecount(buf_T *buf, linenr_T start_lnum,
|
||||
linenr_T end_lnum, colnr_T start_col,
|
||||
colnr_T end_col)
|
||||
{
|
||||
linenr_T max_lnum = buf->b_ml.ml_line_lnum;
|
||||
linenr_T max_lnum = buf->b_ml.ml_line_count;
|
||||
if (start_lnum > max_lnum) {
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user