Mercurial > vim
changeset 26616:d1a60043826c v8.2.3837
patch 8.2.3837: QNX: crash when compiled with GUI but using terminal
Commit: https://github.com/vim/vim/commit/d2ff705af32862b4da49d213613233f93343874c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 17 16:00:04 2021 +0000
patch 8.2.3837: QNX: crash when compiled with GUI but using terminal
Problem: QNX: crash when compiled with GUI but using terminal.
Solution: Check gui.in_use is set. (Hirohito Higashi, closes https://github.com/vim/vim/issues/9363)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 Dec 2021 17:15:03 +0100 |
parents | d549244ead36 |
children | 86ca0d6a6a34 |
files | src/autocmd.c src/version.c |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/autocmd.c +++ b/src/autocmd.c @@ -1613,10 +1613,15 @@ win_found: #endif } #if defined(FEAT_GUI) - // Hide the scrollbars from the aucmd_win and update. - gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE); - gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE); - gui_may_update_scrollbars(); + if (gui.in_use) + { + // Hide the scrollbars from the aucmd_win and update. + gui_mch_enable_scrollbar( + &aucmd_win->w_scrollbars[SBAR_LEFT], FALSE); + gui_mch_enable_scrollbar( + &aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE); + gui_may_update_scrollbars(); + } #endif } else