// "unselect" is needed to handle Ctrl+C copy shortcut collision with ^C signal shortcut private boolean handleCopy(boolean unselect) { if (mySelection != null) { Pair<Point, Point> points = mySelection.pointsForRun(myTermSize.width); copySelection(points.first, points.second); if (unselect) { mySelection = null; repaint(); } return true; } return false; }
private boolean inSelection(int x, int y) { return mySelection != null && mySelection.contains(new Point(x, y)); }