comparison src/ops.c @ 11127:506f5d8b7d8b v8.0.0451

patch 8.0.0451: some macros are in lower case commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 12 19:22:36 2017 +0100 patch 8.0.0451: some macros are in lower case Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Mar 2017 19:30:05 +0100
parents 778c10516955
children f4ea50924c6d
comparison
equal deleted inserted replaced
11126:48599a3eae0b 11127:506f5d8b7d8b
484 484
485 /* If "bd.startspaces" is set, "bd.textstart" points to the character, 485 /* If "bd.startspaces" is set, "bd.textstart" points to the character,
486 * the part of which is displayed at the block's beginning. Let's start 486 * the part of which is displayed at the block's beginning. Let's start
487 * searching from the next character. */ 487 * searching from the next character. */
488 if (bd.startspaces) 488 if (bd.startspaces)
489 mb_ptr_adv(non_white); 489 MB_PTR_ADV(non_white);
490 490
491 /* The character's column is in "bd.start_vcol". */ 491 /* The character's column is in "bd.start_vcol". */
492 non_white_col = bd.start_vcol; 492 non_white_col = bd.start_vcol;
493 493
494 while (vim_iswhite(*non_white)) 494 while (vim_iswhite(*non_white))
524 incr = lbr_chartabsize(line, verbatim_copy_end, 524 incr = lbr_chartabsize(line, verbatim_copy_end,
525 verbatim_copy_width); 525 verbatim_copy_width);
526 if (verbatim_copy_width + incr > destination_col) 526 if (verbatim_copy_width + incr > destination_col)
527 break; 527 break;
528 verbatim_copy_width += incr; 528 verbatim_copy_width += incr;
529 mb_ptr_adv(verbatim_copy_end); 529 MB_PTR_ADV(verbatim_copy_end);
530 } 530 }
531 531
532 /* If "destination_col" is different from the width of the initial 532 /* If "destination_col" is different from the width of the initial
533 * part of the line that will be copied, it means we encountered a tab 533 * part of the line that will be copied, it means we encountered a tab
534 * character, which we will have to partly replace with spaces. */ 534 * character, which we will have to partly replace with spaces. */
3456 * between. */ 3456 * between. */
3457 if (u_save_cursor() == FAIL) 3457 if (u_save_cursor() == FAIL)
3458 goto end; 3458 goto end;
3459 p = ml_get_cursor(); 3459 p = ml_get_cursor();
3460 if (dir == FORWARD && *p != NUL) 3460 if (dir == FORWARD && *p != NUL)
3461 mb_ptr_adv(p); 3461 MB_PTR_ADV(p);
3462 ptr = vim_strsave(p); 3462 ptr = vim_strsave(p);
3463 if (ptr == NULL) 3463 if (ptr == NULL)
3464 goto end; 3464 goto end;
3465 ml_append(curwin->w_cursor.lnum, ptr, (colnr_T)0, FALSE); 3465 ml_append(curwin->w_cursor.lnum, ptr, (colnr_T)0, FALSE);
3466 vim_free(ptr); 3466 vim_free(ptr);
3467 3467
3468 oldp = ml_get_curline(); 3468 oldp = ml_get_curline();
3469 p = oldp + curwin->w_cursor.col; 3469 p = oldp + curwin->w_cursor.col;
3470 if (dir == FORWARD && *p != NUL) 3470 if (dir == FORWARD && *p != NUL)
3471 mb_ptr_adv(p); 3471 MB_PTR_ADV(p);
3472 ptr = vim_strnsave(oldp, p - oldp); 3472 ptr = vim_strnsave(oldp, p - oldp);
3473 if (ptr == NULL) 3473 if (ptr == NULL)
3474 goto end; 3474 goto end;
3475 ml_replace(curwin->w_cursor.lnum, ptr, FALSE); 3475 ml_replace(curwin->w_cursor.lnum, ptr, FALSE);
3476 ++nr_lines; 3476 ++nr_lines;
4487 { 4487 {
4488 #ifdef FEAT_MBYTE 4488 #ifdef FEAT_MBYTE
4489 if (has_mbyte) 4489 if (has_mbyte)
4490 { 4490 {
4491 cend = curr + currsize; 4491 cend = curr + currsize;
4492 mb_ptr_back(curr, cend); 4492 MB_PTR_BACK(curr, cend);
4493 endcurr1 = (*mb_ptr2char)(cend); 4493 endcurr1 = (*mb_ptr2char)(cend);
4494 if (cend > curr) 4494 if (cend > curr)
4495 { 4495 {
4496 mb_ptr_back(curr, cend); 4496 MB_PTR_BACK(curr, cend);
4497 endcurr2 = (*mb_ptr2char)(cend); 4497 endcurr2 = (*mb_ptr2char)(cend);
4498 } 4498 }
4499 } 4499 }
4500 else 4500 else
4501 #endif 4501 #endif
5260 bdp->pre_whitesp = 0; 5260 bdp->pre_whitesp = 0;
5261 bdp->pre_whitesp_c = 0; 5261 bdp->pre_whitesp_c = 0;
5262 } 5262 }
5263 #endif 5263 #endif
5264 prev_pstart = pstart; 5264 prev_pstart = pstart;
5265 mb_ptr_adv(pstart); 5265 MB_PTR_ADV(pstart);
5266 } 5266 }
5267 bdp->start_char_vcols = incr; 5267 bdp->start_char_vcols = incr;
5268 if (bdp->start_vcol < oap->start_vcol) /* line too short */ 5268 if (bdp->start_vcol < oap->start_vcol) /* line too short */
5269 { 5269 {
5270 bdp->end_vcol = bdp->start_vcol; 5270 bdp->end_vcol = bdp->start_vcol;