diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-17 16:00:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-17 16:00:04 +0000 |
commit | d2ff705af32862b4da49d213613233f93343874c (patch) | |
tree | 13e71e3283cb2961d289886299809fcd7bb07600 /src/autocmd.c | |
parent | 02929a372e5e14db1b85abdc7d4515d6b2d81888 (diff) | |
download | vim-git-d2ff705af32862b4da49d213613233f93343874c.tar.gz |
patch 8.2.3837: QNX: crash when compiled with GUI but using terminalv8.2.3837
Problem: QNX: crash when compiled with GUI but using terminal.
Solution: Check gui.in_use is set. (Hirohito Higashi, closes #9363)
Diffstat (limited to 'src/autocmd.c')
-rw-r--r-- | src/autocmd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/autocmd.c b/src/autocmd.c index 305679cf3..789dde1a2 100644 --- 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 |