mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 12:05:21 +02:00
RESOLVED - bug 240097: [terminal] Allow paste with the middle mouse button
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240097
This commit is contained in:
parent
4e399ae9df
commit
84057d7cd6
1 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Michael Scharf (Wind River) - initial API and implementation
|
||||
* Michael Scharf (Wind River) - [240097] Allow paste with the middle mouse button
|
||||
*******************************************************************************/
|
||||
/**
|
||||
*
|
||||
|
@ -14,6 +15,8 @@
|
|||
package org.eclipse.tm.internal.terminal.view;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.events.MouseAdapter;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory;
|
||||
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
|
||||
|
@ -41,6 +44,12 @@ class TerminalViewConnection implements ITerminalViewConnection {
|
|||
|
||||
public TerminalViewConnection(ITerminalViewControl ctl) {
|
||||
fCtlTerminal = ctl;
|
||||
fCtlTerminal.getControl().addMouseListener(new MouseAdapter(){
|
||||
public void mouseUp(MouseEvent e) {
|
||||
// paste when the middle button is clicked
|
||||
if(e.button==2) // middle button
|
||||
fCtlTerminal.paste();
|
||||
}});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue