To: vim-dev@vim.org Subject: Patch 6.1.054 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.054 Problem: GUI: A mouse click is not recognized at the more prompt, even when 'mouse' includes 'r'. Solution: Recognize a mouse click at the more prompt. Also accept a mouse click in the last line in the GUI. Add "ml" entry in 'mouseshape'. Files: src/gui.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c, src/structs.h *** ../vim61.053/src/gui.c Sat May 4 22:23:07 2002 --- src/gui.c Sun May 5 21:48:29 2002 *************** *** 2515,2521 **** #endif case INSERT: case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break; ! case HITRETURN: checkfor = MOUSE_RETURN; break; /* * On the command line, use the clipboard selection on all lines --- 2515,2528 ---- #endif case INSERT: case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break; ! case ASKMORE: ! case HITRETURN: /* At the more- and hit-enter prompt pass the ! mouse event for a click on the last line. */ ! if (Y_2_ROW(y) == Rows - 1) ! checkfor = MOUSE_NORMAL; ! else ! checkfor = MOUSE_RETURN; ! break; /* * On the command line, use the clipboard selection on all lines *************** *** 3868,3874 **** wp = mouse_find_win(&row, &col); # ifdef FEAT_MOUSESHAPE if (State == HITRETURN || State == ASKMORE) ! update_mouseshape(SHAPE_IDX_MORE); else if (row > wp->w_height) /* below status line */ update_mouseshape(SHAPE_IDX_CLINE); # ifdef FEAT_VERTSPLIT --- 3875,3886 ---- wp = mouse_find_win(&row, &col); # ifdef FEAT_MOUSESHAPE if (State == HITRETURN || State == ASKMORE) ! { ! if (Y_2_ROW(y) == Rows - 1) ! update_mouseshape(SHAPE_IDX_MOREL); ! else ! update_mouseshape(SHAPE_IDX_MORE); ! } else if (row > wp->w_height) /* below status line */ update_mouseshape(SHAPE_IDX_CLINE); # ifdef FEAT_VERTSPLIT *** ../vim61.053/src/message.c Mon Apr 29 22:57:48 2002 --- src/message.c Sun May 5 21:07:23 2002 *************** *** 792,797 **** --- 792,798 ---- || c == K_RIGHTDRAG || c == K_RIGHTRELEASE || c == K_MOUSEDOWN || c == K_MOUSEUP || (!mouse_has(MOUSE_RETURN) + && mouse_row != Rows - 1 && (c == K_LEFTMOUSE || c == K_MIDDLEMOUSE || c == K_RIGHTMOUSE)) *************** *** 1748,1753 **** --- 1749,1755 ---- /*FALLTHROUGH*/ case ' ': /* one extra page */ case K_PAGEDOWN: + case K_LEFTMOUSE: lines_left = Rows - 1; break; *** ../vim61.053/src/misc1.c Wed May 1 19:40:35 2002 --- src/misc1.c Sun May 5 21:26:11 2002 *************** *** 2531,2537 **** /* * Get a key stroke directly from the user. ! * Ignores mouse clicks and scrollbar events. * Doesn't use vgetc(), because it syncs undo and eats mapped characters. * Disadvantage: typeahead is ignored. * Translates the interrupt character for unix to ESC. --- 2531,2538 ---- /* * Get a key stroke directly from the user. ! * Ignores mouse clicks and scrollbar events, except a click for the left ! * button (used at the more prompt). * Doesn't use vgetc(), because it syncs undo and eats mapped characters. * Disadvantage: typeahead is ignored. * Translates the interrupt character for unix to ESC. *************** *** 2579,2597 **** if (buf[1] == KS_MODIFIER || n == K_IGNORE #ifdef FEAT_MOUSE - || n == K_LEFTMOUSE || n == K_LEFTMOUSE_NM || n == K_LEFTDRAG ! || n == K_LEFTRELEASE ! || n == K_LEFTRELEASE_NM ! || n == K_MIDDLEMOUSE ! || n == K_MIDDLEDRAG ! || n == K_MIDDLERELEASE ! || n == K_RIGHTMOUSE ! || n == K_RIGHTDRAG ! || n == K_RIGHTRELEASE ! || n == K_MOUSEDOWN ! || n == K_MOUSEUP # ifdef FEAT_GUI || n == K_VER_SCROLLBAR || n == K_HOR_SCROLLBAR --- 2580,2597 ---- if (buf[1] == KS_MODIFIER || n == K_IGNORE #ifdef FEAT_MOUSE || n == K_LEFTMOUSE_NM || n == K_LEFTDRAG ! || n == K_LEFTRELEASE ! || n == K_LEFTRELEASE_NM ! || n == K_MIDDLEMOUSE ! || n == K_MIDDLEDRAG ! || n == K_MIDDLERELEASE ! || n == K_RIGHTMOUSE ! || n == K_RIGHTDRAG ! || n == K_RIGHTRELEASE ! || n == K_MOUSEDOWN ! || n == K_MOUSEUP # ifdef FEAT_GUI || n == K_VER_SCROLLBAR || n == K_HOR_SCROLLBAR *** ../vim61.053/src/misc2.c Sun May 5 14:29:43 2002 --- src/misc2.c Sun May 5 21:48:59 2002 *************** *** 2674,2679 **** --- 2674,2680 ---- {0, 0, 0, 0L, 0L, 0L, 0, 0, "vs", SHAPE_MOUSE}, {0, 0, 0, 0L, 0L, 0L, 0, 0, "vd", SHAPE_MOUSE}, {0, 0, 0, 0L, 0L, 0L, 0, 0, "m", SHAPE_MOUSE}, + {0, 0, 0, 0L, 0L, 0L, 0, 0, "ml", SHAPE_MOUSE}, {0, 0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR}, }; *************** *** 2960,2966 **** --- 2961,2973 ---- { #ifdef FEAT_MOUSESHAPE if (mouse && (State == HITRETURN || State == ASKMORE)) + { + # ifdef FEAT_GUI + if (Y_2_ROW(gui_mch_get_mouse_y()) == Rows - 1) + return SHAPE_IDX_MOREL; + # endif return SHAPE_IDX_MORE; + } if (mouse && drag_status_line) return SHAPE_IDX_SDRAG; # ifdef FEAT_VERTSPLIT *** ../vim61.053/src/option.c Tue Apr 9 21:34:55 2002 --- src/option.c Sun May 5 21:44:55 2002 *************** *** 1436,1442 **** {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, #ifdef FEAT_MOUSESHAPE (char_u *)&p_mouseshape, PV_NONE, ! {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,v:rightup-arrow", (char_u *)0L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} --- 1436,1442 ---- {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, #ifdef FEAT_MOUSESHAPE (char_u *)&p_mouseshape, PV_NONE, ! {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,ml:up-arrow,v:rightup-arrow", (char_u *)0L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} *** ../vim61.053/src/structs.h Fri Feb 22 16:58:41 2002 --- src/structs.h Sun May 5 21:46:09 2002 *************** *** 1487,1494 **** #define SHAPE_IDX_VSEP 12 /* A vertical separator line */ #define SHAPE_IDX_VDRAG 13 /* dragging a vertical separator line */ #define SHAPE_IDX_MORE 14 /* Hit-return or More */ ! #define SHAPE_IDX_SM 15 /* showing matching paren */ ! #define SHAPE_IDX_COUNT 16 #define SHAPE_BLOCK 0 /* block cursor */ #define SHAPE_HOR 1 /* horizontal bar cursor */ --- 1487,1495 ---- #define SHAPE_IDX_VSEP 12 /* A vertical separator line */ #define SHAPE_IDX_VDRAG 13 /* dragging a vertical separator line */ #define SHAPE_IDX_MORE 14 /* Hit-return or More */ ! #define SHAPE_IDX_MOREL 15 /* Hit-return or More in last line */ ! #define SHAPE_IDX_SM 16 /* showing matching paren */ ! #define SHAPE_IDX_COUNT 17 #define SHAPE_BLOCK 0 /* block cursor */ #define SHAPE_HOR 1 /* horizontal bar cursor */ *** ../vim61.053/src/version.c Sun May 5 19:05:22 2002 --- src/version.c Sun May 5 22:46:36 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 54, /**/ -- No children may attend school with their breath smelling of "wild onions." [real standing law in West Virginia, United States of America] /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///