Mercurial > vim
comparison src/ex_cmds.c @ 163:06bc859d1a32 v7.0049
updated for version 7.0049
author | vimboss |
---|---|
date | Mon, 07 Feb 2005 22:05:52 +0000 |
parents | 389c8abd5925 |
children | e943e5502fc9 |
comparison
equal
deleted
inserted
replaced
162:7e6c3b196717 | 163:06bc859d1a32 |
---|---|
3532 linenr_T old_line_count = curbuf->b_ml.ml_line_count; | 3532 linenr_T old_line_count = curbuf->b_ml.ml_line_count; |
3533 linenr_T line2; | 3533 linenr_T line2; |
3534 long nmatch; /* number of lines in match */ | 3534 long nmatch; /* number of lines in match */ |
3535 linenr_T sub_firstlnum; /* nr of first sub line */ | 3535 linenr_T sub_firstlnum; /* nr of first sub line */ |
3536 char_u *sub_firstline; /* allocated copy of first sub line */ | 3536 char_u *sub_firstline; /* allocated copy of first sub line */ |
3537 int endcolumn; /* put cursor in last column when done */ | |
3537 | 3538 |
3538 cmd = eap->arg; | 3539 cmd = eap->arg; |
3539 if (!global_busy) | 3540 if (!global_busy) |
3540 { | 3541 { |
3541 sub_nsubs = 0; | 3542 sub_nsubs = 0; |
3621 EMSG(_(e_nopresub)); | 3622 EMSG(_(e_nopresub)); |
3622 return; | 3623 return; |
3623 } | 3624 } |
3624 pat = NULL; /* search_regcomp() will use previous pattern */ | 3625 pat = NULL; /* search_regcomp() will use previous pattern */ |
3625 sub = old_sub; | 3626 sub = old_sub; |
3627 | |
3628 /* Vi compatibility quirk: repeating with ":s" keeps the cursor in the | |
3629 * last column after using "$". */ | |
3630 endcolumn = (curwin->w_curswant == MAXCOL); | |
3626 } | 3631 } |
3627 | 3632 |
3628 /* | 3633 /* |
3629 * Find trailing options. When '&' is used, keep old options. | 3634 * Find trailing options. When '&' is used, keep old options. |
3630 */ | 3635 */ |
4259 curbuf->b_op_end.lnum = line2; | 4264 curbuf->b_op_end.lnum = line2; |
4260 curbuf->b_op_start.col = curbuf->b_op_end.col = 0; | 4265 curbuf->b_op_start.col = curbuf->b_op_end.col = 0; |
4261 | 4266 |
4262 if (!global_busy) | 4267 if (!global_busy) |
4263 { | 4268 { |
4264 beginline(BL_WHITE | BL_FIX); | 4269 if (endcolumn) |
4270 coladvance((colnr_T)MAXCOL); | |
4271 else | |
4272 beginline(BL_WHITE | BL_FIX); | |
4265 if (!do_sub_msg() && do_ask) | 4273 if (!do_sub_msg() && do_ask) |
4266 MSG(""); | 4274 MSG(""); |
4267 } | 4275 } |
4268 else | 4276 else |
4269 global_need_beginline = TRUE; | 4277 global_need_beginline = TRUE; |