Hi Elijah!
On Sa, 10 Mai 2014, Elijah Griffin wrote:
> Hello,
>
> 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.
>
> Recently I switched from a ubuntu based distro to a slackware based
> one, for reasons that are similar to my crudmudeonly continued use of
> non-GUI vim in black and white xterms. (This newfangled mouse stuff
> didn't exist in vim 3.0! Probably not 4.0 either, but I don't have a
> copy around to test with.)
>
> Curiously clearing ttym, that is "set ttym=", in my .vimrc has a very
> weird brokenness on slackware. I don't know if it is the fault of the
> build, something in the system, but I found it in both the 14.0 and
> 14.1 distros. On slackware, the default vi is elvis, so the vim
> package may be less tested.
>
> Here's what happens when I use that setting. Immediately on startup,
> whether an empty buffer or an existing file, vim pauses for a short
> while then it acts like someone mashed on a function key. The screen
> would flash (visual bell) and I'd be left in a state expecting a move
> command for a change. For a long time I was not able to figure out
> exactly what it was, until I discovered it happens with vim run as ex:
>
> $ ex ~/.vimrc
> "~/.vimrc" 14L, 212C
> Entering Ex mode. Type "visual" to go to Normal mode.
> :^[[>41;297;0c
>
> The ^[ is an escape. This looks like an attempt by vim to send a
> control sequence to the terminal, and based on the ttym involvement
> it's likely a mouse state probe / initialization. Only the single
> line "set ttym=" in ~/.vimrc is necessary for this to happen.
That is the xterm version string. I am not sure what happens and I don't
know the code good enough. At a quick glance at term.c it looks like
when setting the terminal options (set_termname) it resets 'ttym' option
and clears the WAS_SET_FLAG and later on in check_termcode() it
explicitly requests the xterm version info and tries to set ttym to sgr
if WAS_SET_FLAG is reset.
You might want to enable debugging in term.c and see, if the log can
help you figuring out what was wrong.
As a workaround, try to set the ttym setting in an VimEnter workaround.
That might work better.
Best,
Christian
--
Beim Beginnen eine Unternehmung und unweit des Zieles ist die Gefahr
des Mißlingens am größten. - Wenn Schiffe scheitern, so geschieht es
nahe am Ufer.
-- Ludwig Börne
--
--
You received this message from the "vim_use" 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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment