From 89d01c1f2baa743d2d2f67382118ef70080fb5b1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Jan 28 2010 20:19:59 +0000 Subject: - patchlevel 342 --- diff --git a/7.2.342 b/7.2.342 new file mode 100644 index 0000000..72bf253 --- /dev/null +++ b/7.2.342 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.342 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.342 +Problem: Popup menu displayed wrong in 'rightleft' mode when there are + multi-byte characters. +Solution: Adjust the column computations. (Dominique Pelle) +Files: src/popupmnu.c + + +*** ../vim-7.2.341/src/popupmnu.c 2008-11-15 14:10:23.000000000 +0100 +--- src/popupmnu.c 2010-01-19 17:57:05.000000000 +0100 +*************** +*** 345,365 **** + if (st != NULL) + { + char_u *rt = reverse_text(st); +- char_u *rt_saved = rt; +- int len, j; + + if (rt != NULL) + { +! len = (int)STRLEN(rt); +! if (len > pum_width) + { +! for (j = pum_width; j < len; ++j) + mb_ptr_adv(rt); +! len = pum_width; + } +! screen_puts_len(rt, len, row, +! col - len + 1, attr); +! vim_free(rt_saved); + } + vim_free(st); + } +--- 345,380 ---- + if (st != NULL) + { + char_u *rt = reverse_text(st); + + if (rt != NULL) + { +! char_u *rt_start = rt; +! int size; +! +! size = vim_strsize(rt); +! if (size > pum_width) + { +! do +! { +! size -= has_mbyte +! ? (*mb_ptr2cells)(rt) : 1; + mb_ptr_adv(rt); +! } while (size > pum_width); +! +! if (size < pum_width) +! { +! /* Most left character requires +! * 2-cells but only 1 cell is +! * available on screen. Put a +! * '<' on the left of the pum +! * item */ +! *(--rt) = '<'; +! size++; +! } + } +! screen_puts_len(rt, (int)STRLEN(rt), +! row, col - size + 1, attr); +! vim_free(rt_start); + } + vim_free(st); + } +*** ../vim-7.2.341/src/version.c 2010-01-19 17:40:39.000000000 +0100 +--- src/version.c 2010-01-19 18:03:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 342, + /**/ + +-- +I have a watch cat! Just break in and she'll watch. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///