comparison src/edit.c @ 17775:b423bd231f33 v8.1.1884

patch 8.1.1884: cannot use mouse scroll wheel in popup in Insert mode commit https://github.com/vim/vim/commit/f0bc15c769b60f472d411b3ef98d57db510113c1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 18 19:23:45 2019 +0200 patch 8.1.1884: cannot use mouse scroll wheel in popup in Insert mode Problem: Cannot use mouse scroll wheel in popup in Insert mode. Mouse clicks in popup close the popup menu. Solution: Check if the mouse is in a popup window. Do not let mouse events close the popup menu. (closes #4544)
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Aug 2019 19:30:03 +0200
parents 5ed4965ebc7b
children 59f8948b7590
comparison
equal deleted inserted replaced
17774:fa8b9059947b 17775:b423bd231f33
5265 5265
5266 row = mouse_row; 5266 row = mouse_row;
5267 col = mouse_col; 5267 col = mouse_col;
5268 5268
5269 /* find the window at the pointer coordinates */ 5269 /* find the window at the pointer coordinates */
5270 wp = mouse_find_win(&row, &col, FAIL_POPUP); 5270 wp = mouse_find_win(&row, &col, FIND_POPUP);
5271 if (wp == NULL) 5271 if (wp == NULL)
5272 return; 5272 return;
5273 curwin = wp; 5273 curwin = wp;
5274 curbuf = curwin->w_buffer; 5274 curbuf = curwin->w_buffer;
5275 } 5275 }
5286 if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) 5286 if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
5287 scroll_redraw(dir, 5287 scroll_redraw(dir,
5288 (long)(curwin->w_botline - curwin->w_topline)); 5288 (long)(curwin->w_botline - curwin->w_topline));
5289 else 5289 else
5290 scroll_redraw(dir, 3L); 5290 scroll_redraw(dir, 3L);
5291 # ifdef FEAT_TEXT_PROP
5292 if (WIN_IS_POPUP(curwin))
5293 popup_set_firstline(curwin);
5294 # endif
5291 } 5295 }
5292 #ifdef FEAT_GUI 5296 #ifdef FEAT_GUI
5293 else 5297 else
5294 { 5298 {
5295 int val, step = 6; 5299 int val, step = 6;