Mercurial > vim
comparison src/window.c @ 28361:68c36f734b10 v8.2.4706
patch 8.2.4706: buffer remains active with WinClosed and tabpages
Commit: https://github.com/vim/vim/commit/6a06940f8ae7283999c83ccdf268540220573105
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Apr 7 14:08:29 2022 +0100
patch 8.2.4706: buffer remains active with WinClosed and tabpages
Problem: Buffer remains active if a WinClosed event throws an exception
when there are multiple tabpages.
Solution: Ignore aborting() when closing the buffer. (closes #10101)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 Apr 2022 15:15:02 +0200 |
parents | d3a1fc6b4da6 |
children | e466fdbe0699 |
comparison
equal
deleted
inserted
replaced
28360:af739ab30d2a | 28361:68c36f734b10 |
---|---|
2812 return; | 2812 return; |
2813 | 2813 |
2814 if (win->w_buffer != NULL) | 2814 if (win->w_buffer != NULL) |
2815 // Close the link to the buffer. | 2815 // Close the link to the buffer. |
2816 close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, | 2816 close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, |
2817 FALSE, FALSE); | 2817 FALSE, TRUE); |
2818 | 2818 |
2819 // Careful: Autocommands may have closed the tab page or made it the | 2819 // Careful: Autocommands may have closed the tab page or made it the |
2820 // current tab page. | 2820 // current tab page. |
2821 for (ptp = first_tabpage; ptp != NULL && ptp != tp; ptp = ptp->tp_next) | 2821 for (ptp = first_tabpage; ptp != NULL && ptp != tp; ptp = ptp->tp_next) |
2822 ; | 2822 ; |