Mercurial > vim
comparison src/evalfunc.c @ 26978:aa613a3084b9 v8.2.4018
patch 8.2.4018: ml_get error when win_execute redraws with Visual selection
Commit: https://github.com/vim/vim/commit/18f4740f043b353abe47b7a00131317052457686
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 6 13:24:51 2022 +0000
patch 8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem: ml_get error when win_execute redraws with Visual selection.
Solution: Disable Visual area temporarily. (closes https://github.com/vim/vim/issues/9479)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 06 Jan 2022 14:30:05 +0100 |
parents | ac75c145f0a9 |
children | 268f6a3511df |
comparison
equal
deleted
inserted
replaced
26977:b96cf6480624 | 26978:aa613a3084b9 |
---|---|
6862 pos_T *fp = NULL; | 6862 pos_T *fp = NULL; |
6863 int fnum; | 6863 int fnum; |
6864 int id; | 6864 int id; |
6865 tabpage_T *tp; | 6865 tabpage_T *tp; |
6866 win_T *wp; | 6866 win_T *wp; |
6867 win_T *save_curwin; | 6867 switchwin_T switchwin; |
6868 tabpage_T *save_curtab; | |
6869 | 6868 |
6870 if (in_vim9script() | 6869 if (in_vim9script() |
6871 && (check_for_string_arg(argvars, 0) == FAIL | 6870 && (check_for_string_arg(argvars, 0) == FAIL |
6872 || check_for_opt_number_arg(argvars, 1) == FAIL)) | 6871 || check_for_opt_number_arg(argvars, 1) == FAIL)) |
6873 return; | 6872 return; |
6877 // use window specified in the second argument | 6876 // use window specified in the second argument |
6878 id = (int)tv_get_number(&argvars[1]); | 6877 id = (int)tv_get_number(&argvars[1]); |
6879 wp = win_id2wp_tp(id, &tp); | 6878 wp = win_id2wp_tp(id, &tp); |
6880 if (wp != NULL && tp != NULL) | 6879 if (wp != NULL && tp != NULL) |
6881 { | 6880 { |
6882 if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE) | 6881 if (switch_win_noblock(&switchwin, wp, tp, TRUE) == OK) |
6883 == OK) | |
6884 { | 6882 { |
6885 check_cursor(); | 6883 check_cursor(); |
6886 fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE); | 6884 fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE); |
6887 } | 6885 } |
6888 restore_win_noblock(save_curwin, save_curtab, TRUE); | 6886 restore_win_noblock(&switchwin, TRUE); |
6889 } | 6887 } |
6890 } | 6888 } |
6891 else | 6889 else |
6892 // use current window | 6890 // use current window |
6893 fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE); | 6891 fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE); |