summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-05 17:22:12 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-05 17:22:12 +0100
commit5fe6bdf858a7f2f288d599ffb5efb3c08449c817 (patch)
tree06d28d0ae034a699ccd44176ef6f5a61d0854e5f /src/ops.c
parent3767c6e9ee1bd585a2afba7e932854b24d194a2d (diff)
downloadvim-git-5fe6bdf858a7f2f288d599ffb5efb3c08449c817.tar.gz
patch 8.0.1374: CTRL-A does not work with an empty linev8.0.1374
Problem: CTRL-A does not work with an empty line. (Alex) Solution: Decrement the end only once. (Hirohito Higashi, closes #2387)
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index e366903c7..0209334ea 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5433,7 +5433,7 @@ op_addsub(
}
else /* oap->motion_type == MCHAR */
{
- if (!oap->inclusive)
+ if (pos.lnum == oap->start.lnum && !oap->inclusive)
dec(&(oap->end));
length = (colnr_T)STRLEN(ml_get(pos.lnum));
pos.col = 0;