comparison src/misc1.c @ 16682:7847d281cbbf v8.1.1343

patch 8.1.1343: text properties not adjusted for Visual block mode delete commit https://github.com/vim/vim/commit/8055d17388736421d875dd4933c4c93d49a2ab58 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 17 22:57:26 2019 +0200 patch 8.1.1343: text properties not adjusted for Visual block mode delete Problem: Text properties not adjusted for Visual block mode delete. Solution: Call adjust_prop_columns(). (closes https://github.com/vim/vim/issues/4384)
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 May 2019 23:00:05 +0200
parents 30de89c1d090
children 23af483c4ceb
comparison
equal deleted inserted replaced
16681:12218ecea336 16682:7847d281cbbf
432 // cursor was in the indent, and is now after it, put it back 432 // cursor was in the indent, and is now after it, put it back
433 // at the start of the indent (replacing spaces with TAB) 433 // at the start of the indent (replacing spaces with TAB)
434 saved_cursor.col = (colnr_T)(s - newline); 434 saved_cursor.col = (colnr_T)(s - newline);
435 } 435 }
436 #ifdef FEAT_TEXT_PROP 436 #ifdef FEAT_TEXT_PROP
437 adjust_prop_columns(curwin->w_cursor.lnum, (colnr_T)(p - oldline), 437 {
438 ind_len - (colnr_T)(p - oldline)); 438 int added = ind_len - (colnr_T)(p - oldline);
439
440 // When increasing indent this behaves like spaces were inserted at
441 // the old indent, when decreasing indent it behaves like spaces
442 // were deleted at the new indent.
443 adjust_prop_columns(curwin->w_cursor.lnum,
444 (colnr_T)(added > 0 ? (p - oldline) : ind_len), added);
445 }
439 #endif 446 #endif
440 retval = TRUE; 447 retval = TRUE;
441 } 448 }
442 else 449 else
443 vim_free(newline); 450 vim_free(newline);