comparison src/term.c @ 7256:79270eaac6de v7.4.936

commit https://github.com/vim/vim/commit/294a7e55b01149154807a23323038784549b8946 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 22 19:39:38 2015 +0100 patch 7.4.936 Problem: Crash when dragging with the mouse. Solution: Add safety check for NULL pointer. Check mouse position for valid value. (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sun, 22 Nov 2015 19:45:05 +0100
parents 08b50e436093
children b1b86aa171cd
comparison
equal deleted inserted replaced
7255:c4606e322fa4 7256:79270eaac6de
5229 ? (int)KE_MOUSEUP : (int)KE_MOUSEDOWN; 5229 ? (int)KE_MOUSEUP : (int)KE_MOUSEDOWN;
5230 } 5230 }
5231 else 5231 else
5232 key_name[1] = get_pseudo_mouse_code(current_button, 5232 key_name[1] = get_pseudo_mouse_code(current_button,
5233 is_click, is_drag); 5233 is_click, is_drag);
5234
5235 /* Make sure the mouse position is valid. Some terminals may
5236 * return weird values. */
5237 if (mouse_col >= Columns)
5238 mouse_col = Columns - 1;
5239 if (mouse_row >= Rows)
5240 mouse_row = Rows - 1;
5234 } 5241 }
5235 #endif /* FEAT_MOUSE */ 5242 #endif /* FEAT_MOUSE */
5236 5243
5237 #ifdef FEAT_GUI 5244 #ifdef FEAT_GUI
5238 /* 5245 /*