1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Bug 566732: Connect selection preference page to terminal

Bug 549697 introduced the new UI for setting colors, but the
selection color (while added to the pref page) was never
connected to the code.

Change-Id: I9934efe595efe141a14f0bca3bdf355f436d907d
This commit is contained in:
Jonah Graham 2020-09-07 09:50:43 -04:00
parent 9b94dbd5ef
commit e2b94a324f

View file

@ -18,7 +18,6 @@ package org.eclipse.tm.internal.terminal.textcanvas;
import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Font;
@ -78,8 +77,9 @@ public class TextLineRenderer implements ILinelRenderer {
drawCursor(model, doubleBufferGC, line, 0, 0, colFirst);
}
if (fModel.hasLineSelection(line)) {
doubleBufferGC.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
doubleBufferGC.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
TerminalStyle style = TerminalStyle.getStyle(TerminalColor.SELECTION_FOREGROUND,
TerminalColor.SELECTION_BACKGROUND);
setupGC(doubleBufferGC, style);
Point start = model.getSelectionStart();
Point end = model.getSelectionEnd();
char[] chars = model.getTerminalText().getChars(line);