Greg Ruhl
Greg Ruhl

Reputation: 1114

mouse selects from both buffers when using vertical splits

In both vim or gvim 7.3 I am having a problem when selecting lines from the buffer with my mouse when using vertical splits. If I select lines from one of the vertically split buffers I also end up selecting the lines from the other buffer.

In general I use the keyboard to perform selections but there are certain cases where I prefer the mouse (selecting from a VNC window to cut and paste into a windows ENV, etc.).

I have set mouse= in my .vimrc file so my mouse doesn't move the cursor when I click in a gvim window.

Is there a setting to prevent selections across buffers?

Upvotes: 4

Views: 1227

Answers (1)

Brett Y
Brett Y

Reputation: 7688

You've disabled the mouse in vim with set mouse= so the selection is being done by your terminal emulator and not by vim. The terminal emulator does not know about buffers or splits in vim and just selects the entire line across the screen being shown.

If you wish to only select from one buffer you will need to enable the mouse in vim but I'm not sure what else you will need to do.

Upvotes: 2

Related Questions