0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.1374: CTRL-A does not work with an empty line

Problem:    CTRL-A does not work with an empty line. (Alex)
Solution:   Decrement the end only once. (Hirohito Higashi, closes #2387)
This commit is contained in:
Bram Moolenaar
2017-12-05 17:22:12 +01:00
parent 3767c6e9ee
commit 5fe6bdf858
3 changed files with 24 additions and 1 deletions

View File

@@ -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;