Mercurial > vim
comparison src/ex_cmds.c @ 11800:5ceaecedbad2 v8.0.0782
patch 8.0.0782: using freed memory in quickfix code
commit https://github.com/vim/vim/commit/d28cc3f55d4a5a980f6ac6fa682382822a223720
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 27 22:03:50 2017 +0200
patch 8.0.0782: using freed memory in quickfix code
Problem: Using freed memory in quickfix code. (Dominique Pelle)
Solution: Handle a help window differently. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 27 Jul 2017 22:15:03 +0200 |
parents | 5cd9ba96561d |
children | bc0fee081e1e |
comparison
equal
deleted
inserted
replaced
11799:4614433e6af6 | 11800:5ceaecedbad2 |
---|---|
6312 | 6312 |
6313 /* | 6313 /* |
6314 * Re-use an existing help window or open a new one. | 6314 * Re-use an existing help window or open a new one. |
6315 * Always open a new one for ":tab help". | 6315 * Always open a new one for ":tab help". |
6316 */ | 6316 */ |
6317 if (!curwin->w_buffer->b_help | 6317 if (!bt_help(curwin->w_buffer) |
6318 #ifdef FEAT_WINDOWS | 6318 #ifdef FEAT_WINDOWS |
6319 || cmdmod.tab != 0 | 6319 || cmdmod.tab != 0 |
6320 #endif | 6320 #endif |
6321 ) | 6321 ) |
6322 { | 6322 { |
6323 #ifdef FEAT_WINDOWS | 6323 #ifdef FEAT_WINDOWS |
6324 if (cmdmod.tab != 0) | 6324 if (cmdmod.tab != 0) |
6325 wp = NULL; | 6325 wp = NULL; |
6326 else | 6326 else |
6327 FOR_ALL_WINDOWS(wp) | 6327 FOR_ALL_WINDOWS(wp) |
6328 if (wp->w_buffer != NULL && wp->w_buffer->b_help) | 6328 if (bt_help(wp->w_buffer)) |
6329 break; | 6329 break; |
6330 if (wp != NULL && wp->w_buffer->b_nwindows > 0) | 6330 if (wp != NULL && wp->w_buffer->b_nwindows > 0) |
6331 win_enter(wp, TRUE); | 6331 win_enter(wp, TRUE); |
6332 else | 6332 else |
6333 #endif | 6333 #endif |
6423 #if defined(FEAT_WINDOWS) | 6423 #if defined(FEAT_WINDOWS) |
6424 win_T *win; | 6424 win_T *win; |
6425 | 6425 |
6426 FOR_ALL_WINDOWS(win) | 6426 FOR_ALL_WINDOWS(win) |
6427 { | 6427 { |
6428 if (win->w_buffer->b_help) | 6428 if (bt_help(win->w_buffer)) |
6429 { | 6429 { |
6430 win_close(win, FALSE); | 6430 win_close(win, FALSE); |
6431 return; | 6431 return; |
6432 } | 6432 } |
6433 } | 6433 } |