comparison src/ops.c @ 12996:973a0037f4c3 v8.0.1374

patch 8.0.1374: CTRL-A does not work with an empty line commit https://github.com/vim/vim/commit/5fe6bdf858a7f2f288d599ffb5efb3c08449c817 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 5 17:22:12 2017 +0100 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 https://github.com/vim/vim/issues/2387)
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Dec 2017 17:30:05 +0100
parents d1cbe8cb05d0
children 6e81a68d63a1
comparison
equal deleted inserted replaced
12995:814c18a298a9 12996:973a0037f4c3
5431 pos.col = 0; 5431 pos.col = 0;
5432 length = (colnr_T)STRLEN(ml_get(pos.lnum)); 5432 length = (colnr_T)STRLEN(ml_get(pos.lnum));
5433 } 5433 }
5434 else /* oap->motion_type == MCHAR */ 5434 else /* oap->motion_type == MCHAR */
5435 { 5435 {
5436 if (!oap->inclusive) 5436 if (pos.lnum == oap->start.lnum && !oap->inclusive)
5437 dec(&(oap->end)); 5437 dec(&(oap->end));
5438 length = (colnr_T)STRLEN(ml_get(pos.lnum)); 5438 length = (colnr_T)STRLEN(ml_get(pos.lnum));
5439 pos.col = 0; 5439 pos.col = 0;
5440 if (pos.lnum == oap->start.lnum) 5440 if (pos.lnum == oap->start.lnum)
5441 { 5441 {