comparison src/move.c @ 30487:79e2d9b7780c v9.0.0579

patch 9.0.0579: using freed memory when 'tagfunc' wipes out buffer Commit: https://github.com/vim/vim/commit/0ff01835a40f549c5c4a550502f62a2ac9ac447c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 24 19:20:30 2022 +0100 patch 9.0.0579: using freed memory when 'tagfunc' wipes out buffer Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid.
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Sep 2022 20:30:03 +0200
parents b5f67135fcb6
children 729e2305f4b2
comparison
equal deleted inserted replaced
30486:004697058faf 30487:79e2d9b7780c
681 * w_topline must be valid, you may need to call update_topline() first! 681 * w_topline must be valid, you may need to call update_topline() first!
682 */ 682 */
683 void 683 void
684 validate_cursor(void) 684 validate_cursor(void)
685 { 685 {
686 check_cursor();
686 check_cursor_moved(curwin); 687 check_cursor_moved(curwin);
687 if ((curwin->w_valid & (VALID_WCOL|VALID_WROW)) != (VALID_WCOL|VALID_WROW)) 688 if ((curwin->w_valid & (VALID_WCOL|VALID_WROW)) != (VALID_WCOL|VALID_WROW))
688 curs_columns(TRUE); 689 curs_columns(TRUE);
689 } 690 }
690 691