Mercurial > vim
comparison src/autocmd.c @ 16847:f8e28c6ae8ab v8.1.1425
patch 8.1.1425: win_execute() does not set window pointers properly
commit https://github.com/vim/vim/commit/89adc3a1371d211f7766f3dbc0975ecb2f862327
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 30 17:29:40 2019 +0200
patch 8.1.1425: win_execute() does not set window pointers properly
Problem: Win_execute() does not set window pointers properly.
Solution: Use switch_win_noblock(). Also execute autocommands in a popup
window.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 May 2019 17:30:06 +0200 |
parents | ce04ebdf26b8 |
children | 4dac68c4a34a |
comparison
equal
deleted
inserted
replaced
16846:339949bc111a | 16847:f8e28c6ae8ab |
---|---|
1347 * gives problems when the autocommands make changes to the list of | 1347 * gives problems when the autocommands make changes to the list of |
1348 * buffers or windows... | 1348 * buffers or windows... |
1349 */ | 1349 */ |
1350 FOR_ALL_BUFFERS(buf) | 1350 FOR_ALL_BUFFERS(buf) |
1351 { | 1351 { |
1352 if (buf->b_ml.ml_mfp != NULL && !bt_popup(buf)) | 1352 if (buf->b_ml.ml_mfp != NULL) |
1353 { | 1353 { |
1354 // find a window for this buffer and save some values | 1354 // find a window for this buffer and save some values |
1355 aucmd_prepbuf(&aco, buf); | 1355 aucmd_prepbuf(&aco, buf); |
1356 set_bufref(&bufref, buf); | 1356 set_bufref(&bufref, buf); |
1357 | 1357 |
1610 char_u *fname, // NULL or empty means use actual file name | 1610 char_u *fname, // NULL or empty means use actual file name |
1611 char_u *fname_io, // fname to use for <afile> on cmdline | 1611 char_u *fname_io, // fname to use for <afile> on cmdline |
1612 int force, // when TRUE, ignore autocmd_busy | 1612 int force, // when TRUE, ignore autocmd_busy |
1613 buf_T *buf) // buffer for <abuf> | 1613 buf_T *buf) // buffer for <abuf> |
1614 { | 1614 { |
1615 if (bt_popup(buf)) | |
1616 return FALSE; | |
1617 return apply_autocmds_group(event, fname, fname_io, force, | 1615 return apply_autocmds_group(event, fname, fname_io, force, |
1618 AUGROUP_ALL, buf, NULL); | 1616 AUGROUP_ALL, buf, NULL); |
1619 } | 1617 } |
1620 | 1618 |
1621 /* | 1619 /* |