Skip to content

Conversation

@bobrippling
Copy link
Contributor

... and the other tab itself isn't closed. The test contains a short repro, but essentially we end up with a tab's tp_curwin becoming dangling.

win_free_mem already mitigates this when the tab isn't the current tab, so we fix it for the current tab too.
An alternative fix could be to set tp_curwin at the end of win_remove(), but that would affect all other removals too, which usually have their own code to update the current window.

... and the other tab isn't also closed
@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #7018 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7018      +/-   ##
==========================================
- Coverage   88.61%   88.60%   -0.02%     
==========================================
  Files         148      148              
  Lines      161693   161693              
==========================================
- Hits       143286   143267      -19     
- Misses      18407    18426      +19     
Impacted Files Coverage Δ
src/window.c 92.56% <100.00%> (ø)
src/netbeans.c 76.07% <0.00%> (-0.60%) ⬇️
src/os_unix.c 70.48% <0.00%> (-0.53%) ⬇️
src/term.c 82.51% <0.00%> (-0.44%) ⬇️
src/gui_gtk_x11.c 58.73% <0.00%> (-0.15%) ⬇️
src/search.c 92.31% <0.00%> (-0.10%) ⬇️
src/ex_getln.c 91.30% <0.00%> (-0.05%) ⬇️
src/message.c 88.49% <0.00%> (-0.05%) ⬇️
src/channel.c 89.97% <0.00%> (+0.10%) ⬆️
src/clipboard.c 83.42% <0.00%> (+0.10%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 509f803...e8e013f. Read the comment docs.

@brammool brammool closed this in f3c51bb Sep 26, 2020
@bobrippling bobrippling deleted the fix/winclose-other-tab branch June 29, 2021 21:29
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Dec 2, 2022
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes vim/vim#7018)

vim/vim@f3c51bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Dec 2, 2022
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes vim/vim#7018)

vim/vim@f3c51bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
Nero-F pushed a commit to Nero-F/neovim that referenced this pull request Dec 16, 2022
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes vim/vim#7018)

vim/vim@f3c51bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
yesean pushed a commit to yesean/neovim that referenced this pull request Mar 25, 2023
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes vim/vim#7018)

vim/vim@f3c51bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant