Monday, May 12, 2014

Re: "set ttym=" on slackware

On Mon, May 12, 2014 at 02:20:47AM -0400, Elijah Griffin wrote:
> Erik Falor wrote:
> > On Sat, May 10, 2014 at 02:12:44AM -0400, Elijah Griffin wrote:
> >> I've been using "set ttym=" and "set mouse=" in my vimrc for a while.
> >> It clears the mouse setting in non-GUI vim so that my mouse continues
> >> to work the way I expect it to.
> > I have been unable to reproduce the problem you are experiencing. I
> > tried doing so by running Vim in this fashion:
> > vim --noplugin -u NONE -c 'set ttym= mouse='
>
> I will confirm it does not occur with -u NONE, with or without
> --noplugin.
>
> > Could you supply a minimal .vimrc which contains exactly the settings
> > that cause this problem for you?
>
> I sort of did: I can comment out every single line of my .vimrc except
>
> set ttym=

I have now reproduced the bug you're seeing by creating a .vimrc
containing only that line. I can reliably reproduce the problem both
in terminals xterm and rxvt-unicode-256color. However, if I run Vim
within GNU Screen I do not see the bad behavior. I have also
reproduced the bad behavior on my Gentoo x86_64 box using Vim 7.4.258
which I built myself. I am not convinced that this is a problem with
Slackware's packaging of Vim.

By invoking Vim with -u NONE I avoid the incorrect behavior. A trivial
.vimrc combined with --noplugin still exhibits the bad behavior. By running
'vim --noplugin -V2' I see that many scripts from /usr/share/vim are
sourced. All of those scripts are avoided with -u NONE. I wonder now if
the problem may be in one of those?

I see only three changes in the hg changelog that seem to deal with the
ttymouse option:

changeset: 5076:19ed30f7cef7
tag: v7-3-1281
user: Bram Moolenaar <bram@vim.org>
date: Mon Jul 01 20:06:19 2013 +0200
files: src/term.c src/version.c
description:
updated for version 7.3.1281
Problem: When 'ttymouse' is set to "xterm2" clicking in column 123 moves
the cursor to column 96. (Kevin Goodsell)
Solution: Decode KE_CSI.

changeset: 3980:aab4b29520e7
tag: v7-3-745
user: Bram Moolenaar <bram@vim.org>
date: Wed Dec 05 14:43:02 2012 +0100
files: src/option.c src/proto/option.pro src/term.c src/version.c
description:
updated for version 7.3.745
Problem: Automatically setting 'ttymouse' doesn't work.
Solution: Reset the "option was set" flag when using the default.

changeset: 3885:4ffb6f9b58e0
tag: v7-3-699
user: Bram Moolenaar <bram@vim.org>
date: Sun Oct 21 02:10:24 2012 +0200
files: src/term.c src/version.c
description:
updated for version 7.3.699
Problem: When 'ttymouse' is set to "sgr" manually, it is overruled by
automatic detection.
Solution: Do not use automatic detection when 'ttymouse' was set manually.
(Hayaki Saito)


I haven't looked into the source changes more closely than this, but I
bring it up to point out that this may have been broken for quite some
time.

My conclusion is that either we're trying to use the ttymouse= setting
in the wrong way, or a regression was added to Vim at some point in
the past. Could you tell us what version of Vim you were using prior
to switching to Slackware? That will help in pinpointing the patch
that introduced this behavior. At least knowing which version of the
distro you were on will be useful.

--
Erik Falor
Registered Linux User #445632 http://linuxcounter.net

No comments:

Post a Comment