comparison src/ex_docmd.c @ 598:05c67faedc8b

updated for version 7.0170
author vimboss
date Wed, 14 Dec 2005 21:59:55 +0000
parents fea48f63efc8
children 9e359e5759f6
comparison
equal deleted inserted replaced
597:b9975513fe24 598:05c67faedc8b
8501 vim_free(arg); 8501 vim_free(arg);
8502 #endif 8502 #endif
8503 } 8503 }
8504 8504
8505 /* 8505 /*
8506 * ":startinsert" and ":startreplace" 8506 * ":startinsert", ":startreplace" and ":startgreplace"
8507 */ 8507 */
8508 static void 8508 static void
8509 ex_startinsert(eap) 8509 ex_startinsert(eap)
8510 exarg_T *eap; 8510 exarg_T *eap;
8511 { 8511 {
8519 /* Ignore the command when already in Insert mode. Inserting an 8519 /* Ignore the command when already in Insert mode. Inserting an
8520 * expression register that invokes a function can do this. */ 8520 * expression register that invokes a function can do this. */
8521 if (State & INSERT) 8521 if (State & INSERT)
8522 return; 8522 return;
8523 8523
8524 if (eap->forceit) 8524 if (eap->cmdidx == CMD_startinsert)
8525 { 8525 restart_edit = 'a';
8526 if (eap->cmdidx == CMD_startinsert) 8526 else if (eap->cmdidx == CMD_startreplace)
8527 restart_edit = 'a'; 8527 restart_edit = 'R';
8528 else
8529 restart_edit = 'R';
8530 }
8531 else 8528 else
8529 restart_edit = 'V';
8530
8531 if (!eap->forceit)
8532 { 8532 {
8533 if (eap->cmdidx == CMD_startinsert) 8533 if (eap->cmdidx == CMD_startinsert)
8534 restart_edit = 'i'; 8534 restart_edit = 'i';
8535 else
8536 restart_edit = 'R';
8537 curwin->w_curswant = 0; /* avoid MAXCOL */ 8535 curwin->w_curswant = 0; /* avoid MAXCOL */
8538 } 8536 }
8539 } 8537 }
8540 8538
8541 /* 8539 /*