0
0
mirror of https://github.com/vim/vim.git synced 2025-09-01 21:03:39 -04:00

updated for version 7.3.695

Problem:    Balloon cannot show multi-byte text.
Solution:   Properly deal with multi-byte characters. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar 2012-10-21 00:58:39 +02:00
parent 2d17fa3ebd
commit b6101cf77f
3 changed files with 10 additions and 6 deletions

View File

@ -359,7 +359,7 @@ get_beval_info(beval, getword, winp, lnump, textp, colp)
} }
} }
col = vcol2col(wp, lnum, col) - 1; col = vcol2col(wp, lnum, col);
if (VIsual_active if (VIsual_active
&& wp->w_buffer == curwin->w_buffer && wp->w_buffer == curwin->w_buffer
@ -377,8 +377,10 @@ get_beval_info(beval, getword, winp, lnump, textp, colp)
return FAIL; return FAIL;
lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE); lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE);
lbuf = vim_strnsave(lbuf + spos->col, len = epos->col - spos->col;
epos->col - spos->col + (*p_sel != 'e')); if (*p_sel != 'e')
len += MB_PTR2LEN(lbuf + epos->col);
lbuf = vim_strnsave(lbuf + spos->col, len);
lnum = spos->lnum; lnum = spos->lnum;
col = spos->col; col = spos->col;
} }

View File

@ -98,7 +98,7 @@ ui_inchar_undo(s, len)
#endif #endif
/* /*
* ui_inchar(): low level input funcion. * ui_inchar(): low level input function.
* Get characters from the keyboard. * Get characters from the keyboard.
* Return the number of characters that are available. * Return the number of characters that are available.
* If "wtime" == 0 do not wait for characters. * If "wtime" == 0 do not wait for characters.
@ -493,7 +493,7 @@ clip_own_selection(cbd)
} }
} }
#else #else
/* Only own the clibpard when we didn't own it yet. */ /* Only own the clipboard when we didn't own it yet. */
if (!cbd->owned && cbd->available) if (!cbd->owned && cbd->available)
cbd->owned = (clip_gen_own_selection(cbd) == OK); cbd->owned = (clip_gen_own_selection(cbd) == OK);
#endif #endif
@ -3132,7 +3132,7 @@ vcol2col(wp, lnum, vcol)
char_u *start; char_u *start;
start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
while (count <= vcol && *ptr != NUL) while (count < vcol && *ptr != NUL)
{ {
count += win_lbr_chartabsize(wp, ptr, count, NULL); count += win_lbr_chartabsize(wp, ptr, count, NULL);
mb_ptr_adv(ptr); mb_ptr_adv(ptr);

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
695,
/**/ /**/
694, 694,
/**/ /**/