I'm running a Tmux session inside a MobaXTerm SSH connection. Now if I want to select some text to be copied to the system clipboard (by holding shift pressed while dragging the mouse over the text) the selection does not work as expected.
Assume I select one word. I press and hold shift, press and hold the mouse button over the first character of the word, move the mouse to the end of the word and release the mouse button. The word gets highlighted and copied to the clipboard. This works fine.
However, now I change my mind, or discover that I selected the wrong word, and want to select a different word. Again I do the same sequence as before, but on the other word. Strangely, when I press and hold the mouse on the new word, the highlighting is not reset, but continued from the initial highlighting of the previous selection.
This is extremely annoying. I can only reset the selection by temporarily switching to a different window. It seems this problem only occurs with MobaXTerm. If I use Putty instead, the selection works fine. I checked all settings of MobaXterm, but can't find anything related to mouse events.
To clear a selected region (after selecting with shift + drag) you can either:
I think (1) sometimes does not work when I have vim in my tmux pane, but (2) works regardless.
After clearing the selection, you should be able to start another from a new location.