comparison src/gui.c @ 17809:59f8948b7590 v8.1.1901

patch 8.1.1901: the +insert_expand feature is not always available Commit: https://github.com/vim/vim/commit/e2c453d38f6512ac4cff7cd26aa7780b4e2534d7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 21 14:37:09 2019 +0200 patch 8.1.1901: the +insert_expand feature is not always available Problem: The +insert_expand feature is not always available. Solution: Graduate the +insert_expand feature.
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Aug 2019 14:45:04 +0200
parents 0f7ae8010787
children 5ae41d0ea397
comparison
equal deleted inserted replaced
17808:42561b61bfd8 17809:59f8948b7590
4017 * This also checked input_available(), but that causes the first click in 4017 * This also checked input_available(), but that causes the first click in
4018 * a scrollbar to be ignored when Vim doesn't have focus. */ 4018 * a scrollbar to be ignored when Vim doesn't have focus. */
4019 if (dont_scroll) 4019 if (dont_scroll)
4020 return; 4020 return;
4021 #endif 4021 #endif
4022 #ifdef FEAT_INS_EXPAND
4023 /* Disallow scrolling the current window when the completion popup menu is 4022 /* Disallow scrolling the current window when the completion popup menu is
4024 * visible. */ 4023 * visible. */
4025 if ((sb->wp == NULL || sb->wp == curwin) && pum_visible()) 4024 if ((sb->wp == NULL || sb->wp == curwin) && pum_visible())
4026 return; 4025 return;
4027 #endif
4028 4026
4029 #ifdef FEAT_RIGHTLEFT 4027 #ifdef FEAT_RIGHTLEFT
4030 if (sb->wp == NULL && curwin->w_p_rl) 4028 if (sb->wp == NULL && curwin->w_p_rl)
4031 { 4029 {
4032 value = sb->max + 1 - sb->size - value; 4030 value = sb->max + 1 - sb->size - value;
4483 #endif 4481 #endif
4484 ) 4482 )
4485 { 4483 {
4486 int type = VALID; 4484 int type = VALID;
4487 4485
4488 #ifdef FEAT_INS_EXPAND
4489 if (pum_visible()) 4486 if (pum_visible())
4490 { 4487 {
4491 type = NOT_VALID; 4488 type = NOT_VALID;
4492 wp->w_lines_valid = 0; 4489 wp->w_lines_valid = 0;
4493 } 4490 }
4494 #endif 4491
4495 /* Don't set must_redraw here, it may cause the popup menu to 4492 /* Don't set must_redraw here, it may cause the popup menu to
4496 * disappear when losing focus after a scrollbar drag. */ 4493 * disappear when losing focus after a scrollbar drag. */
4497 if (wp->w_redr_type < type) 4494 if (wp->w_redr_type < type)
4498 wp->w_redr_type = type; 4495 wp->w_redr_type = type;
4499 mch_disable_flush(); 4496 mch_disable_flush();
4500 updateWindow(wp); /* update window, status line, and cmdline */ 4497 updateWindow(wp); /* update window, status line, and cmdline */
4501 mch_enable_flush(); 4498 mch_enable_flush();
4502 } 4499 }
4503 4500
4504 #ifdef FEAT_INS_EXPAND
4505 /* May need to redraw the popup menu. */ 4501 /* May need to redraw the popup menu. */
4506 if (pum_visible()) 4502 if (pum_visible())
4507 pum_redraw(); 4503 pum_redraw();
4508 #endif
4509 4504
4510 return (wp == curwin && !EQUAL_POS(curwin->w_cursor, old_cursor)); 4505 return (wp == curwin && !EQUAL_POS(curwin->w_cursor, old_cursor));
4511 } 4506 }
4512 4507
4513 4508