mirror of
https://github.com/neovim/neovim.git
synced 2025-12-14 18:35:47 +00:00
vim-patch:8.1.0425: ml_get error and crash with appendbufline()
Problem: ml_get error and crash with appendbufline(). (Masashi Iizuka) Solution: Set per-window buffer info. (Hirohito Higashi, closes vim/vim#3455)9cea87c577Co-authored-by: Bram Moolenaar <Bram@vim.org> (cherry picked from commitc6f0a19206)
This commit is contained in:
committed by
github-actions[bot]
parent
30db74de66
commit
a65c4be2de
@@ -1728,6 +1728,9 @@ void enter_buffer(buf_T *buf)
|
||||
// mark cursor position as being invalid
|
||||
curwin->w_valid = 0;
|
||||
|
||||
buflist_setfpos(curbuf, curwin, curbuf->b_last_cursor.mark.lnum,
|
||||
curbuf->b_last_cursor.mark.col, true);
|
||||
|
||||
// Make sure the buffer is loaded.
|
||||
if (curbuf->b_ml.ml_mfp == NULL) { // need to load the file
|
||||
// If there is no filetype, allow for detecting one. Esp. useful for
|
||||
|
||||
Reference in New Issue
Block a user