This seems to make us behave more like gnome-terminal, in the timing of the setting of the selection. With the patch, we don't set the selection on the initial multiple click, nor on each drag. Nor does gnome-terminal.
The behavior when we end up with the empty selection may appear, from the patch, to have changed but it hasn't, as updateSystemSelection and copyToClipboard are both guarded by:
if (!hasSelection()) {
// Almost all X11 applications leave the selection alone in this case.
return;
}
The condition in mouseReleased is now the same as the one in mouseDragged, guarding us from changing the selection when the wrong mouse button is released.
Sheep eat?
--- /home/martind/software.jessies.org/work/terminator/src/terminator/view/highlight/SelectionHighlighter.java (revision 1632)
+++ /home/martind/software.jessies.org/work/terminator/src/terminator/view/highlight/SelectionHighlighter.java (working copy)
@@ -96,7 +96,10 @@
SelectionHighlighter.mouseClicked
}
public
void mouseReleased(MouseEvent event) {
- dragHandler =
null;
+ if
(SwingUtilities.isLeftMouseButton(event) && (dragHandler != null)) {
+ selectionChanged();
+ dragHandler
= null;
+ }
}
public
void mouseDragged(MouseEvent event) {
@@ -217,6 +220,7 @@
SelectionHighlighter.clearSelection SelectionHighlighter.selectAll
Location
start = new Location(0, 0);
Location
end = new Location(view.getModel().getLineCount(), 0);
setHighlight(start,
end);
+ selectionChanged();
}
/**
@@ -296,7 +300,6 @@
SelectionHighlighter.setHighlight
} else {
highlightStart
= start;
highlightEnd
= end;
- selectionChanged();
}
view.repaint();
}
--
You received this message because you are subscribed to the Google Groups
"terminator-users" group.
To post to this group, send email to terminat...@googlegroups.com.
To unsubscribe from this group, send email to
terminator-use...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/terminator-users?hl=en.
--
Elliott Hughes - http://www.jessies.org/~enh/