comparison src/popupwin.c @ 23869:5a4f9c5c1b99 v8.2.2476

patch 8.2.2476: using freed memory when splitting window while closing buffer Commit: https://github.com/vim/vim/commit/983d83ff1cd796ff321074335fa53fbe7ac45a46 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 12:12:43 2021 +0100 patch 8.2.2476: using freed memory when splitting window while closing buffer Problem: Using freed memory when using an autocommand to split a window while a buffer is being closed. Solution: Disallow splitting when the buffer has b_locked_split set.
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Feb 2021 12:15:03 +0100
parents 12b446696927
children 3033dade50ca
comparison
equal deleted inserted replaced
23868:1a97398d5e5a 23869:5a4f9c5c1b99
1939 set_string_option_direct_in_buf(buf, (char_u *)"bufhidden", -1, 1939 set_string_option_direct_in_buf(buf, (char_u *)"bufhidden", -1,
1940 (char_u *)"wipe", OPT_FREE|OPT_LOCAL, 0); 1940 (char_u *)"wipe", OPT_FREE|OPT_LOCAL, 0);
1941 buf->b_p_ul = -1; // no undo 1941 buf->b_p_ul = -1; // no undo
1942 buf->b_p_swf = FALSE; // no swap file 1942 buf->b_p_swf = FALSE; // no swap file
1943 buf->b_p_bl = FALSE; // unlisted buffer 1943 buf->b_p_bl = FALSE; // unlisted buffer
1944 buf->b_locked = TRUE; 1944 buf->b_locked = TRUE; // prevent deleting the buffer
1945 1945
1946 // Avoid that 'buftype' is reset when this buffer is entered. 1946 // Avoid that 'buftype' is reset when this buffer is entered.
1947 buf->b_p_initialized = TRUE; 1947 buf->b_p_initialized = TRUE;
1948 } 1948 }
1949 wp->w_p_wrap = TRUE; // 'wrap' is default on 1949 wp->w_p_wrap = TRUE; // 'wrap' is default on