summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-10-21 00:58:39 +0200
committerBram Moolenaar <Bram@vim.org>2012-10-21 00:58:39 +0200
commitb6101cf77f3e9e8cc33a94a0c01db3bcde96eba9 (patch)
treeffe5ee8321ccde1516dded430ca321ada6c44504 /src
parent2d17fa3ebd378097e3c0feab813a2c60fc9bf474 (diff)
downloadvim-b6101cf77f3e9e8cc33a94a0c01db3bcde96eba9.zip
updated for version 7.3.695
Problem: Balloon cannot show multi-byte text. Solution: Properly deal with multi-byte characters. (Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r--src/gui_beval.c8
-rw-r--r--src/ui.c6
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 6 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c
index f9f7e0004..84d6acded 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -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
&& wp->w_buffer == curwin->w_buffer
@@ -377,8 +377,10 @@ get_beval_info(beval, getword, winp, lnump, textp, colp)
return FAIL;
lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE);
- lbuf = vim_strnsave(lbuf + spos->col,
- epos->col - spos->col + (*p_sel != 'e'));
+ len = epos->col - spos->col;
+ if (*p_sel != 'e')
+ len += MB_PTR2LEN(lbuf + epos->col);
+ lbuf = vim_strnsave(lbuf + spos->col, len);
lnum = spos->lnum;
col = spos->col;
}
diff --git a/src/ui.c b/src/ui.c
index d164376d4..372e0375f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -98,7 +98,7 @@ ui_inchar_undo(s, len)
#endif
/*
- * ui_inchar(): low level input funcion.
+ * ui_inchar(): low level input function.
* Get characters from the keyboard.
* Return the number of characters that are available.
* If "wtime" == 0 do not wait for characters.
@@ -493,7 +493,7 @@ clip_own_selection(cbd)
}
}
#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)
cbd->owned = (clip_gen_own_selection(cbd) == OK);
#endif
@@ -3132,7 +3132,7 @@ vcol2col(wp, lnum, vcol)
char_u *start;
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);
mb_ptr_adv(ptr);
diff --git a/src/version.c b/src/version.c
index f28590b9d..73ca9637d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 695,
+/**/
694,
/**/
693,