]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.695 v7.3.695
authorBram Moolenaar <Bram@vim.org>
Sat, 20 Oct 2012 22:58:39 +0000 (00:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 20 Oct 2012 22:58:39 +0000 (00:58 +0200)
Problem:    Balloon cannot show multi-byte text.
Solution:   Properly deal with multi-byte characters. (Dominique Pelle)

src/gui_beval.c
src/ui.c
src/version.c

index f9f7e00042d881b4f0132498477210472bebaf19..84d6acdeda9e82899ce14b82f41ede4cdf079994 100644 (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
                            && 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;
                    }
index d164376d400f3f4420a159f5145d639b0bcaa9a1..372e0375fcfe5a25899ddd7473470ed340dd0cde 100644 (file)
--- 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);
index f28590b9d1fd7de9872041ac46ddd88097fc8e0c..73ca9637d5688af418ee11ee964496573e8425e2 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    695,
 /**/
     694,
 /**/