diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-09-21 17:33:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-09-21 17:33:53 +0200 |
commit | a554a1933c61d5464c5878ea41ec4dce02c2f01e (patch) | |
tree | 86e4a96b3fbd5adb65249f71cbc52cba9fcf9bc4 | |
parent | 38e2b0636b23fd5a7b2da0a86bbca714ba98e31b (diff) | |
download | vim-git-a554a1933c61d5464c5878ea41ec4dce02c2f01e.tar.gz |
updated for version 7.3.318v7.3.318
Problem: "C" on the last line deletes that line if it's blank.
Solution: Only delete the last line for a delete operation. (James Vega)
-rw-r--r-- | src/ops.c | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 4 deletions
@@ -1922,7 +1922,9 @@ op_delete(oap) curwin->w_cursor.coladd = 0; } #endif - if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count + if (oap->op_type == OP_DELETE + && oap->inclusive + && oap->end.lnum == curbuf->b_ml.ml_line_count && n > (int)STRLEN(ml_get(oap->end.lnum))) { /* Special case: gH<Del> deletes the last line. */ @@ -3331,8 +3333,8 @@ do_put(regname, dir, count, flags) if (regname == '=') { /* For the = register we need to split the string at NL - * characters. */ - /* Loop twice: count the number of lines and save them. */ + * characters. + * Loop twice: count the number of lines and save them. */ for (;;) { y_size = 0; @@ -3348,7 +3350,7 @@ do_put(regname, dir, count, flags) if (y_array != NULL) *ptr = NUL; ++ptr; - /* A trailing '\n' makes the string linewise */ + /* A trailing '\n' makes the register linewise. */ if (*ptr == NUL) { y_type = MLINE; diff --git a/src/version.c b/src/version.c index 35ed103da..a22a46048 100644 --- a/src/version.c +++ b/src/version.c @@ -710,6 +710,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 318, +/**/ 317, /**/ 316, |