Mercurial > vim
comparison src/ex_getln.c @ 18457:71199e360948 v8.1.2222
patch 8.1.2222: accessing invalid memory
Commit: https://github.com/vim/vim/commit/7ab5d77666c98f5229759402a451a26ea57a4801
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 26 20:45:24 2019 +0200
patch 8.1.2222: accessing invalid memory
Problem: Accessing invalid memory. (Dominique Pelle)
Solution: Reset highlight_match every time. (closes https://github.com/vim/vim/issues/5125)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Oct 2019 21:00:04 +0200 |
parents | 34d5cd432cac |
children | 18d7337b6837 |
comparison
equal
deleted
inserted
replaced
18456:6d11fc4aa683 | 18457:71199e360948 |
---|---|
523 // May redraw the status line to show the cursor position. | 523 // May redraw the status line to show the cursor position. |
524 if (p_ru && curwin->w_status_height > 0) | 524 if (p_ru && curwin->w_status_height > 0) |
525 curwin->w_redr_status = TRUE; | 525 curwin->w_redr_status = TRUE; |
526 | 526 |
527 update_screen(SOME_VALID); | 527 update_screen(SOME_VALID); |
528 highlight_match = FALSE; | |
528 restore_last_search_pattern(); | 529 restore_last_search_pattern(); |
529 | 530 |
530 // Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the | 531 // Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the |
531 // end of the pattern, e.g. for ":s/pat/". | 532 // end of the pattern, e.g. for ":s/pat/". |
532 if (ccline.cmdbuff[skiplen + patlen] != NUL) | 533 if (ccline.cmdbuff[skiplen + patlen] != NUL) |
640 update_topline(); | 641 update_topline(); |
641 validate_cursor(); | 642 validate_cursor(); |
642 highlight_match = TRUE; | 643 highlight_match = TRUE; |
643 save_viewstate(&is_state->old_viewstate); | 644 save_viewstate(&is_state->old_viewstate); |
644 update_screen(NOT_VALID); | 645 update_screen(NOT_VALID); |
646 highlight_match = FALSE; | |
645 redrawcmdline(); | 647 redrawcmdline(); |
646 curwin->w_cursor = is_state->match_end; | 648 curwin->w_cursor = is_state->match_end; |
647 } | 649 } |
648 else | 650 else |
649 vim_beep(BO_ERROR); | 651 vim_beep(BO_ERROR); |