a bug with tear-off menu in Win32 gvim.

54 views
Skip to first unread message

StarWing

unread,
Oct 31, 2010, 11:58:52 PM10/31/10
to vim_dev
hi all,

when I use gVim with language set to chinese, the tear-off menu seems
can't work in some menu list.

reproduce:

in Windows( I am not test in other OS):

set LANG=zh_CN.UTF-8

gvim -u NONE -U NONE

click the "syntax" menu (now displayed as "语法“), and click the tear-
off item.

error:

displayed as "
撕下此菜单
E337: 找不到菜单 - 请检查菜单名称
"

means"
tear-off the menu
E337: can't find menu - check the menu name
"

don't know how this happen.

thanks for attention :-)

lilydjwg

unread,
Nov 2, 2010, 6:48:07 AM11/2/10
to vim_dev
I can confirm this on my Windows. However, this issue won't happen on
my Ubuntu Linux. (But the torn-up menu won't disappear when I click
the dash line with Awesome as the window manager.)

Alex

unread,
Nov 2, 2010, 7:38:16 PM11/2/10
to vim_dev
Hi all,

Yes, there is a bug in Vim. The patch below fixes it for me in Win32
gVim.

Testing on other platforms is welcome.

regards,

Alex

>>>>>>>> BEGIN HG EXPORT
# HG changeset patch
# User Alex Jakushev <alex.j...@gmail.com>
# Date 1288740721 0
# Node ID a23c064836156051bda9a08573cc376c165e7335
# Parent df6b12c84b2359415cd987c016f5de135c680100
Bugfix - clicking on tearoff menu gave E337 error if menu was
translated.

Reason - untranslated parent menu name was posted to message queue by
tearoff, but it was compared to (possibly) translated menu name on
menu resolving.

diff -r df6b12c84b23 -r a23c06483615 src/menu.c
--- a/src/menu.c Wed Oct 27 18:36:36 2010 +0200
+++ b/src/menu.c Tue Nov 02 23:32:01 2010 +0000
@@ -2342,7 +2342,7 @@

while (menu != NULL)
{
- if (STRCMP(name, menu->name) == 0 || STRCMP(name, menu->dname)
== 0)
+ if (menu_name_equal(name, menu))
{
if (menu->children == NULL)
{
>>>>>>>> END HG EXPORT
Reply all
Reply to author
Forward
0 new messages