(Oops, I forgot to Cc to the list again, gotta look into mutt's doc...)

On Wed, Oct 26, 2011 at 11:42:17PM +0800, lilydjwg wrote:
> On Wed, Oct 26, 2011 at 04:10:15PM +0200, Bram Moolenaar wrote:
> > 
> > lilydjwg wrote:
> > 
> > > Patch 343 introduced this bug and here is the patch.
> > 
> > I don't understand the problem and the fix doesn't appear to be right.
> > Can you explain please?
> 
> Sorry my patch is wrong.
> 
> After applied patch 343, when I enter Vim, the mouse is not recognized
> by vim. Setting 'ttymouse' to 'xterm' or 'xterm2' will enable it. Before
> the patch, I do not need to set 'ttymouse' to use mouse support. There
> is nothing special about tmux; I recompiled and it's the same in and
> outsite tmux.
> 
> But there IS something wrong. The relative code is:
> 
> # ifdef FEAT_MOUSE_URXVT
>     /* same as the dec mouse */
>     if (use_xterm_mouse() == 3
> #  ifdef FEAT_GUI
>           && !gui.in_use
> #  endif
>           )
>     {
>       set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
>                   ? IF_EB("\233", CSI_STR)
>                   : IF_EB("\033[", ESC_STR "[")));
> 
>       if (*p_mouse != NUL)
>       {
>           mch_setmouse(FALSE);
>           setmouse();
>       }
>     }
>     else
>       del_mouse_termcode(KS_URXVT_MOUSE);
> # endif
> 
> That is about mouse support for urxvt (`use_xterm_mouse` returns 3). If
> it is not urxvt, `del_mouse_termcode` is invoked. In this function, the
> `HMT_NORMAL` bit is cleared as there is not handling about urxvt
> (term.c:2017) so `setmouse` thinks the mouse is off (term.c:3300).
> 
> I am attaching my working patch, hoping that this time I solved the
> problem in the right way.
> 
> Thanks.
> 
> -- 
> Best regards,
> lilydjwg
> 
> Linux Vim Python 我的博客
> http://lilydjwg.is-programmer.com/

-- 
Best regards,
lilydjwg

Linux Vim Python 我的博客
http://lilydjwg.is-programmer.com/

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui