Mercurial > vim
comparison src/evalwindow.c @ 18259:f254dd2bc107 v8.1.2124
patch 8.1.2124: ruler is not updated if win_execute() moves cursor
Commit: https://github.com/vim/vim/commit/345f28df5482cd35f5fa74b06443376379f113b0
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 8 22:20:35 2019 +0200
patch 8.1.2124: ruler is not updated if win_execute() moves cursor
Problem: Ruler is not updated if win_execute() moves cursor.
Solution: Update the status line. (closes https://github.com/vim/vim/issues/5022)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Oct 2019 22:30:04 +0200 |
parents | f4b51934d4f8 |
children | 49b78d6465e5 |
comparison
equal
deleted
inserted
replaced
18258:7392f162e56c | 18259:f254dd2bc107 |
---|---|
653 win_T *save_curwin; | 653 win_T *save_curwin; |
654 tabpage_T *save_curtab; | 654 tabpage_T *save_curtab; |
655 | 655 |
656 if (wp != NULL && tp != NULL) | 656 if (wp != NULL && tp != NULL) |
657 { | 657 { |
658 pos_T curpos = wp->w_cursor; | |
659 | |
658 if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE) == OK) | 660 if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE) == OK) |
659 { | 661 { |
660 check_cursor(); | 662 check_cursor(); |
661 execute_common(argvars, rettv, 1); | 663 execute_common(argvars, rettv, 1); |
662 } | 664 } |
663 restore_win_noblock(save_curwin, save_curtab, TRUE); | 665 restore_win_noblock(save_curwin, save_curtab, TRUE); |
666 | |
667 // Update the status line if the cursor moved. | |
668 if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor)) | |
669 wp->w_redr_status = TRUE; | |
664 } | 670 } |
665 } | 671 } |
666 | 672 |
667 /* | 673 /* |
668 * "win_findbuf()" function | 674 * "win_findbuf()" function |