Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

PuTTY/KiTTY/etc. have an option to bring up a right-click menu with a Paste option in it, rather than instantly pasting.

enter image description here

The problem with this is that if there is a selection in the terminal then that selection is pasted, rather than the contents of the clipboard.

enter image description here

This is obviously bad behaviour and seems to be a problem related to the interaction of the xterm versus a proper Windows app? How can we disable this "function"?

share|improve this question
    
What version are you using? Using PuTTY beta 0.62 it successfully brings up the context menu on a right-click. –  bfhd May 29 '12 at 3:30
    
sure, but then select paste and it will paste the selection rather than the clipboard contents. Check out the pic I posted. –  Coxy May 29 '12 at 3:51
add comment

2 Answers

The problem with this is that if there is a selection in the terminal then that selection is pasted, rather than the contents of the clipboard.

Yes and no.

In PuTTY, selecting text copies it to the clipboard, so the clipboard's previous content gets replaced by the selection. (source)

There is no way to disable this feature. (source)

share|improve this answer
2  
Also, if you copy something else to clipboard after making the selection in PuTTY, the selection disappears. So I guess the only real answer is don't select something in the PuTTY window before you paste into it. –  bfhd May 29 '12 at 4:05
    
Yes. To avoid overwriting it again, I assume. –  Dennis May 29 '12 at 4:10
add comment

I think I found the lines in the PuTTY 0.62 that overwrites the Windows clipboard when you finish selecting some text in the terminal.

Lines 6109-6110 in terminal.c:

clipme(term, term->selstart, term->selend,
   (term->seltype == RECTANGULAR), FALSE);

Unfortunately after going to the hassle of installing mingw I was unable to compile KiTTY from source and so leave this tidbit for future generations.

share|improve this answer
    
What about the PuTTY 0.62 source? KiTTY adds a lot of extra features, so its source is likely more complex. –  Lèse majesté May 29 '12 at 7:53
    
@Lèsemajesté: That's certainly possible, but I would rather use KiTTY with this xterm selection behaviour than PuTTY without it. –  Coxy May 30 '12 at 0:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.