Mercurial > vim
comparison src/undo.c @ 27378:a4746d1a3cf3 v8.2.4217
patch 8.2.4217: illegal memory access when undo makes Visual area invalid
Commit: https://github.com/vim/vim/commit/8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 25 18:24:00 2022 +0000
patch 8.2.4217: illegal memory access when undo makes Visual area invalid
Problem: Illegal memory access when undo makes Visual area invalid.
Solution: Correct the Visual area after undo.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 25 Jan 2022 19:30:04 +0100 |
parents | c9474ae175f4 |
children | 41e0dcf38521 |
comparison
equal
deleted
inserted
replaced
27377:94507d9cc370 | 27378:a4746d1a3cf3 |
---|---|
3027 if (wp->w_buffer == curbuf && wp->w_p_cole > 0) | 3027 if (wp->w_buffer == curbuf && wp->w_p_cole > 0) |
3028 redraw_win_later(wp, NOT_VALID); | 3028 redraw_win_later(wp, NOT_VALID); |
3029 } | 3029 } |
3030 } | 3030 } |
3031 #endif | 3031 #endif |
3032 if (VIsual_active) | |
3033 check_pos(curbuf, &VIsual); | |
3032 | 3034 |
3033 smsg_attr_keep(0, _("%ld %s; %s #%ld %s"), | 3035 smsg_attr_keep(0, _("%ld %s; %s #%ld %s"), |
3034 u_oldcount < 0 ? -u_oldcount : u_oldcount, | 3036 u_oldcount < 0 ? -u_oldcount : u_oldcount, |
3035 _(msgstr), | 3037 _(msgstr), |
3036 did_undo ? _("before") : _("after"), | 3038 did_undo ? _("before") : _("after"), |