]> granicus.if.org Git - vim/commitdiff
updated for version 7.0170
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Dec 2005 21:59:55 +0000 (21:59 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Dec 2005 21:59:55 +0000 (21:59 +0000)
runtime/doc/index.txt
src/ex_docmd.c
src/normal.c

index bbd178d242d4835d9cf1d34446dece9af1848bd2..7c529364f4d90d58ba65a55fa0496750d135ba85 100644 (file)
@@ -1,4 +1,4 @@
-*index.txt*     For Vim version 7.0aa.  Last change: 2005 Dec 12
+*index.txt*     For Vim version 7.0aa.  Last change: 2005 Dec 14
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1354,7 +1354,7 @@ The commands are sorted on the non-optional part of their name.
                                buffer list
 |:scriptnames| :scrip[tnames]  list names of all sourced Vim scripts
 |:scriptencoding| :scripte[ncoding]    encoding used in sourced Vim script
-|:scscope|     :scs[cope]      split window and execute cscope command
+|:scscope|     :scs[cope]      split window and execute cscope command
 |:set|         :se[t]          show or set options
 |:setfiletype| :setf[iletype]  set 'filetype', unless it was set already
 |:setglobal|   :setg[lobal]    show global values of options
@@ -1388,6 +1388,7 @@ The commands are sorted on the non-optional part of their name.
 |:stop|                :st[op]         suspend the editor or escape to a shell
 |:stag|                :sta[g]         split window and jump to a tag
 |:startinsert| :star[tinsert]  start Insert mode
+|:startgreplace| :startg[replace] start Virtual Replace mode
 |:startreplace|        :startr[eplace] start Replace mode
 |:stopinsert|| :stopi[nsert]   stop Insert mode
 |:stjump|      :stj[ump]       do ":tjump" and split window
index d8aa8e52f7cf9b305857a584a554fb9ad755d57d..3e001a242cb398486ff0042e3d55806313c7e7cd 100644 (file)
@@ -8503,7 +8503,7 @@ ex_normal(eap)
 }
 
 /*
- * ":startinsert" and ":startreplace"
+ * ":startinsert", ":startreplace" and ":startgreplace"
  */
     static void
 ex_startinsert(eap)
@@ -8521,19 +8521,17 @@ ex_startinsert(eap)
     if (State & INSERT)
        return;
 
-    if (eap->forceit)
-    {
-       if (eap->cmdidx == CMD_startinsert)
-           restart_edit = 'a';
-       else
-           restart_edit = 'R';
-    }
+    if (eap->cmdidx == CMD_startinsert)
+       restart_edit = 'a';
+    else if (eap->cmdidx == CMD_startreplace)
+       restart_edit = 'R';
     else
+       restart_edit = 'V';
+
+    if (!eap->forceit)
     {
        if (eap->cmdidx == CMD_startinsert)
            restart_edit = 'i';
-       else
-           restart_edit = 'R';
        curwin->w_curswant = 0;     /* avoid MAXCOL */
     }
 }
index cee008e63e2d7f2d577646a04bc0dd3602ea6e71..dfd2f0dfe2f28332925a1248b0e1294454e38853 100644 (file)
@@ -2277,11 +2277,13 @@ do_mouse(oap, c, dir, count, fixindent)
            got_click = FALSE;
     }
 
+#ifndef FEAT_VISUAL
     /*
-     * ALT is currently ignored
+     * ALT is only used for starging/extending Visual mode.
      */
     if ((mod_mask & MOD_MASK_ALT))
        return FALSE;
+#endif
 
     /*
      * CTRL right mouse button does CTRL-T
@@ -2313,9 +2315,12 @@ do_mouse(oap, c, dir, count, fixindent)
            && (!is_click
                || (mod_mask & MOD_MASK_MULTI_CLICK)
                || which_button == MOUSE_MIDDLE)
-           && !((mod_mask & MOD_MASK_SHIFT)
+           && !((mod_mask & (MOD_MASK_SHIFT|MOD_MASK_ALT))
                && mouse_model_popup()
                && which_button == MOUSE_LEFT)
+           && !((mod_mask & MOD_MASK_ALT)
+               && !mouse_model_popup()
+               && which_button == MOUSE_RIGHT)
            )
        return FALSE;
 
@@ -2413,6 +2418,7 @@ do_mouse(oap, c, dir, count, fixindent)
      * When 'mousemodel' is "popup" or "popup_setpos", translate mouse events:
      * right button up   -> pop-up menu
      * shift-left button -> right button
+     * alt-left button   -> alt-right button
      */
     if (mouse_model_popup())
     {
@@ -2504,7 +2510,8 @@ do_mouse(oap, c, dir, count, fixindent)
            return FALSE;
 #endif
        }
-       if (which_button == MOUSE_LEFT && (mod_mask & MOD_MASK_SHIFT))
+       if (which_button == MOUSE_LEFT
+                               && (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_ALT)))
        {
            which_button = MOUSE_RIGHT;
            mod_mask &= ~MOD_MASK_SHIFT;
@@ -2641,6 +2648,10 @@ do_mouse(oap, c, dir, count, fixindent)
 
     if (start_visual.lnum)             /* right click in visual mode */
     {
+       /* When ALT is pressed make Visual mode blockwise. */
+       if (mod_mask & MOD_MASK_ALT)
+          VIsual_mode = Ctrl_V;
+
        /*
         * In Visual-block mode, divide the area in four, pick up the corner
         * that is in the quarter that the cursor is in.
@@ -2845,7 +2856,13 @@ do_mouse(oap, c, dir, count, fixindent)
                setmouse();
            }
            if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
-               VIsual_mode = 'v';
+           {
+               /* Double click with ALT pressed makes it blockwise. */
+               if (mod_mask & MOD_MASK_ALT)
+                   VIsual_mode = Ctrl_V;
+               else
+                   VIsual_mode = 'v';
+           }
            else if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_3CLICK)
                VIsual_mode = 'V';
            else if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_4CLICK)
@@ -2921,7 +2938,12 @@ do_mouse(oap, c, dir, count, fixindent)
            redraw_curbuf_later(INVERTED);      /* update the inversion */
     }
     else if (VIsual_active && !old_active)
-       VIsual_mode = 'v';
+    {
+       if (mod_mask & MOD_MASK_ALT)
+           VIsual_mode = Ctrl_V;
+       else
+           VIsual_mode = 'v';
+    }
 
     /* If Visual mode changed show it later. */
     if (p_smd && (VIsual_active != old_active || VIsual_mode != old_mode))