Bug 45399 [painting] Background changes to yellow when pressing Ctrl in the Java editor
I have not yet found a set of steps to predictably reproduce this, although it seems to be related to using the ctrl key (I frequently use ctrl-left and ctrl-right to move the cursor between words) in the Java editor over an extended period of time. 1. Whenever the ctrl key is pressed, all the text between the current cursor position and some seemingly random position in the file changes to orange-on-yellow (see screenshot 1). Releasing the ctrl key will sometimes change the text back. 2. Occasionally, releasing the ctrl key will not change the text back to normal, and the text colour will be permanently changed in portions of the file (see screenshot 2). Pressing ctrl additional times will simply discolour additional portions of the file. The Java editor must be closed and reopened before the text returns to normal. Issue 2 is probably a bug, but it's possible that issue 1 is part of some feature that I'm unwittingly activating through some typo. If so, then it would be nice if this feature were disabled by default.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposal.java
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.java;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControlCreator;