Mercurial > vim
comparison src/normal.c @ 84:60834e43d187
updated for version 7.0034
author | vimboss |
---|---|
date | Sat, 08 Jan 2005 16:04:29 +0000 |
parents | eff3887963cc |
children | 8b0ee9d57d7f |
comparison
equal
deleted
inserted
replaced
83:d9030055c432 | 84:60834e43d187 |
---|---|
8409 cmdarg_T *cap; | 8409 cmdarg_T *cap; |
8410 { | 8410 { |
8411 #ifdef FEAT_VISUAL | 8411 #ifdef FEAT_VISUAL |
8412 int regname = 0; | 8412 int regname = 0; |
8413 void *reg1 = NULL, *reg2 = NULL; | 8413 void *reg1 = NULL, *reg2 = NULL; |
8414 int empty = FALSE; | |
8414 #endif | 8415 #endif |
8415 int dir; | 8416 int dir; |
8416 int flags = 0; | 8417 int flags = 0; |
8417 | 8418 |
8418 if (cap->oap->op_type != OP_NOP) | 8419 if (cap->oap->op_type != OP_NOP) |
8465 cap->cmdchar = 'd'; | 8466 cap->cmdchar = 'd'; |
8466 cap->nchar = NUL; | 8467 cap->nchar = NUL; |
8467 cap->oap->regname = NUL; | 8468 cap->oap->regname = NUL; |
8468 nv_operator(cap); | 8469 nv_operator(cap); |
8469 do_pending_operator(cap, 0, FALSE); | 8470 do_pending_operator(cap, 0, FALSE); |
8471 empty = (curbuf->b_ml.ml_flags & ML_EMPTY); | |
8470 | 8472 |
8471 /* delete PUT_LINE_BACKWARD; */ | 8473 /* delete PUT_LINE_BACKWARD; */ |
8472 cap->oap->regname = regname; | 8474 cap->oap->regname = regname; |
8473 | 8475 |
8474 if (reg1 != NULL) | 8476 if (reg1 != NULL) |
8502 | 8504 |
8503 #ifdef FEAT_VISUAL | 8505 #ifdef FEAT_VISUAL |
8504 /* If a register was saved, put it back now. */ | 8506 /* If a register was saved, put it back now. */ |
8505 if (reg2 != NULL) | 8507 if (reg2 != NULL) |
8506 put_register(regname, reg2); | 8508 put_register(regname, reg2); |
8509 /* When all lines were selected and deleted do_put() leaves an empty | |
8510 * line that needs to delete now. */ | |
8511 if (empty && *ml_get(curbuf->b_ml.ml_line_count) == NUL) | |
8512 ml_delete(curbuf->b_ml.ml_line_count, TRUE); | |
8507 #endif | 8513 #endif |
8508 auto_format(FALSE, TRUE); | 8514 auto_format(FALSE, TRUE); |
8509 } | 8515 } |
8510 } | 8516 } |
8511 | 8517 |