comparison src/ops.c @ 474:a5fcf36ef512 v7.0127

updated for version 7.0127
author vimboss
date Wed, 10 Aug 2005 21:07:57 +0000
parents 7472c565592a
children bf5ba8a0cdee
comparison
equal deleted inserted replaced
473:4a7320e53f32 474:a5fcf36ef512
418 ws_vcol = bd.start_vcol - bd.pre_whitesp; 418 ws_vcol = bd.start_vcol - bd.pre_whitesp;
419 if (bd.startspaces) 419 if (bd.startspaces)
420 { 420 {
421 #ifdef FEAT_MBYTE 421 #ifdef FEAT_MBYTE
422 if (has_mbyte) 422 if (has_mbyte)
423 bd.textstart += (*mb_ptr2len_check)(bd.textstart); 423 bd.textstart += (*mb_ptr2len)(bd.textstart);
424 #endif 424 #endif
425 ++bd.textstart; 425 ++bd.textstart;
426 } 426 }
427 for ( ; vim_iswhite(*bd.textstart); ) 427 for ( ; vim_iswhite(*bd.textstart); )
428 { 428 {
3322 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col); 3322 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &col);
3323 3323
3324 #ifdef FEAT_MBYTE 3324 #ifdef FEAT_MBYTE
3325 if (has_mbyte) 3325 if (has_mbyte)
3326 /* move to start of next multi-byte character */ 3326 /* move to start of next multi-byte character */
3327 curwin->w_cursor.col += (*mb_ptr2len_check)(ml_get_cursor()); 3327 curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
3328 else 3328 else
3329 #endif 3329 #endif
3330 #ifdef FEAT_VIRTUALEDIT 3330 #ifdef FEAT_VIRTUALEDIT
3331 if (c != TAB || ve_flags != VE_ALL) 3331 if (c != TAB || ve_flags != VE_ALL)
3332 #endif 3332 #endif
3488 if (dir == FORWARD && gchar_cursor() != NUL) 3488 if (dir == FORWARD && gchar_cursor() != NUL)
3489 { 3489 {
3490 #ifdef FEAT_MBYTE 3490 #ifdef FEAT_MBYTE
3491 if (has_mbyte) 3491 if (has_mbyte)
3492 { 3492 {
3493 int bytelen = (*mb_ptr2len_check)(ml_get_cursor()); 3493 int bytelen = (*mb_ptr2len)(ml_get_cursor());
3494 3494
3495 /* put it on the next of the multi-byte character. */ 3495 /* put it on the next of the multi-byte character. */
3496 col += bytelen; 3496 col += bytelen;
3497 if (yanklen) 3497 if (yanklen)
3498 { 3498 {
3840 n -= 2; 3840 n -= 2;
3841 } 3841 }
3842 for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p) 3842 for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
3843 { 3843 {
3844 #ifdef FEAT_MBYTE 3844 #ifdef FEAT_MBYTE
3845 clen = (*mb_ptr2len_check)(p); 3845 clen = (*mb_ptr2len)(p);
3846 #endif 3846 #endif
3847 msg_outtrans_len(p, clen); 3847 msg_outtrans_len(p, clen);
3848 #ifdef FEAT_MBYTE 3848 #ifdef FEAT_MBYTE
3849 p += clen - 1; 3849 p += clen - 1;
3850 #endif 3850 #endif
3943 while (*p != NUL 3943 while (*p != NUL
3944 && !(*p == ESC && skip_esc && *(p + 1) == NUL) 3944 && !(*p == ESC && skip_esc && *(p + 1) == NUL)
3945 && (n -= ptr2cells(p)) >= 0) 3945 && (n -= ptr2cells(p)) >= 0)
3946 { 3946 {
3947 #ifdef FEAT_MBYTE 3947 #ifdef FEAT_MBYTE
3948 if (has_mbyte && (l = (*mb_ptr2len_check)(p)) > 1) 3948 if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
3949 { 3949 {
3950 msg_outtrans_len(p, l); 3950 msg_outtrans_len(p, l);
3951 p += l; 3951 p += l;
3952 } 3952 }
3953 else 3953 else
5972 } 5972 }
5973 else if (!vim_isspace(line[i])) 5973 else if (!vim_isspace(line[i]))
5974 is_word = 1; 5974 is_word = 1;
5975 ++chars; 5975 ++chars;
5976 #ifdef FEAT_MBYTE 5976 #ifdef FEAT_MBYTE
5977 i += mb_ptr2len_check(line + i); 5977 i += (*mb_ptr2len)(line + i);
5978 #else 5978 #else
5979 ++i; 5979 ++i;
5980 #endif 5980 #endif
5981 } 5981 }
5982 5982