Monday, May 3, 2010

Re: Stair stepping

On Mon, 3 May 2010, Harry Putnam wrote:

> Tony Mechelynck writes:
>
> > According to ":help 'paste'", setting paste is not necessary in
> > gvim,
>
> I'm not using gvim. I should have made it clearer
>
> > nor in a terminal where Vim handles the mouse clicks itself. So: are
> > you sure you're using the same terminal as a few months ago? Are the
> > mouse actions (when Vim runs in that terminal) handled by the
> > terminal or passed to Vim? Does it make a difference if you use "*P
> > rather than middle-click (or than the terminal's Edit => Paste menu
> > if any)?
>
> I don't know what `*P' is. I use middle click.
>
> I do not know if the terminal has changed . I use xterms almost
> exclusively and prefer vim in an xterm... not gvim.
>
> I normally start vim in an xterm with the usual
> vim filename
>
> Typing in an xterm:
> xterm -version
> XTerm(256)
>
> Not some gnome terminal, KDE terminal or some other jive.. just a
> regular xterm.

I also use Gentoo.

xterm-256 wasn't in portage a couple months ago, so your terminal has
certainly changed in the last few months. Using all combinations of
vim-7.2.{182,411} and xterm-{223,256}, though, I see the undesired
behavior. It looks like older xterms (including 243, which was what I
had installed when I started exploring this) have a USE-flag called
'paste64', which apparently adds the --enable-paste64 compile flag.

My guess is that --enable-paste64 (which is no longer in the ebuild) is
essentially built-in at this point.

Upgrading back to xterm-256 and adding the line:
UXTerm*allowWindowOps: true
to my ~/.Xdefaults file solved the problem[1]. IIUC, this enables
'bracketed paste' mode[2] (possibly other things?), but may have
security implications[1b].

--
Best,
Ben

[1] discovered via these lines in the ebuild:
if use paste64 ; then
elog "bracketed paste mode requires the allowWindowOps resource to be true"
elog "which is false by default for security reasons (see bug #91453)."
elog "To be able to use it add 'allowWindowOps: true' to your resources"
fi
[1b] bug #91453: http://bugs.gentoo.org/91453

[2] http://www.xfree86.org/current/ctlseqs.html#Bracketed%20Paste%20Mode

--
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

No comments: