36329 Reproducible: Always Steps to Reproduce: 1. 2. 3.
Sorry, I accidentally pressed Enter too early ;) Here goes the bug description: 1. start vim in an xterm (not in screen) 2. type :set mouse=a 3. type :split 4. Try to drag the status line to resize the window This will not work. However, it works in the console, so this is no duplicate to #36329. I have solved this doing two steps (yes, two, either of them alone did not solve the problem): 1. remove " set t_RV=" in /etc/vim/vimrc 2. remove the gentoo patches by deleting the following lines in /usr/portage/eclass/vim.eclass: EPATCH_SUFFIX="gz" EPATCH_FORCE="yes" \ epatch ${WORKDIR}/gentoo/patches-all/ ...and remerge vim. My vim version is vim-6.3, however, in 6.2 the problem occured. My xterm version is "XFree86 4.2.99.903(174)". ATM, I do not have enough time to find out which of the patches is the bad one. Regards, Christoph P.S. I am really sorry for posting this thrice or so, but when I press the back button in mozilla, bugzilla seems to think I want to add a new bug...
*** Bug 54536 has been marked as a duplicate of this bug. ***
Add "vim-with-x" to USE in /etc/make.conf This is a local USE variable to determine whether vim links against X libraries. The intuitive thing would be USE=X, but it seems that most people would prefer that vim refrain from linking against X libs by default so that vim can be used even when X libs are not working.
I don't think that this is right. Having done the two steps that I described above, mouse support does work in an xterm, and vim is _not_ linked against any X libraries: $ ldd /usr/bin/vim linux-gate.so.1 => (0xffffe000) libncurses.so.5 => /lib/libncurses.so.5 (0x40029000) libgpm.so.1 => /usr/lib/libgpm.so.1 (0x4006a000) libperl.so.1 => /usr/lib/libperl.so.1 (0x40070000) libutil.so.1 => /lib/libutil.so.1 (0x40197000) libc.so.6 => /lib/libc.so.6 (0x4019a000) libruby18.so.1.8 => /usr/lib/libruby18.so.1.8 (0x402aa000) libm.so.6 => /lib/libm.so.6 (0x4036b000) libdl.so.2 => /lib/libdl.so.2 (0x4038d000) libpthread.so.0 => /lib/libpthread.so.0 (0x40390000) libnsl.so.1 => /lib/libnsl.so.1 (0x403e1000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x403f5000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) I am not quite sure how mouse support works on terminals, but I think it is rather a terminal feature than an X feature (as you can see from the fact that it works even over ssh without X forwarding). Furthermore, ":help mouse" does not tell us that we need X support for the mouse to work in an xterm. I really do think that there is a problem with the patches and with the xterm-specific configuration in /etc/vim/vimrc. I am going to trace it down when I have some spare time.
Well, I did trace it down and found out that you just have to add one line to /etc/vim/vimrc (and don't have to delete the patches, as I had suggested yesterday): if &term=="xterm" set t_RV= set t_Co=8 set t_Sb=^[4%dm set t_Sf=^[3%dm set ttymouse=xterm2 " this line is new, --Christoph endif However, I really don't get it why the patches disable the terminal auto detection and these ugly-workaround-lines have to be in /etc/vim/vimrc at all, but I guess it does have a reason. Please add my line to the next release, Thank you, Christoph
Good catch, Christoph! Regarding the t_RV setting, you can see the reason in an older version of the Gentoo vimrc: http://www.gentoo.org/cgi-bin/viewcvs.cgi/app-editors/vim/files/vimrc?rev=1.2&content-type=text/vnd.viewcvs-markup However I have tested with current gnome-terminals and I think that we can safely remove that setting. Additionally it should not be required to override t_Co at this point. I'll add the ttymouse=xterm2 setting. Thanks!
Ok, it's fixed in vim-core. I didn't bother to rev-bump. Thanks again!
Hi again, sorry for re-opening this the second time, but I daresay I have found a better solution to the problem. I have tried deleting 006_all_vim-6.0r-crv.patch.gz, which is located in app-editors/vim-core/files/vimpatch.tar.bz2. Now, even without any xterm-specific stuff in the vimrc (and without vim-with-x), 'ttymouse' is correctly auto-detected to "xterm2". The patch in question is dated to January 2001 and I failed looking for the reason it was taken into portage. But I guess it is just out of date. Could we just remove this patch so that we can have a "cleaner" vimrc? Christoph
Can this bug be closed?
Hmm, I can't seem to reproduce this, and the reporter hasn't given any more info in 2 years... WORKSFORME Christoph, feel free to re-open this bug if it's still a problem.