Commit 0027ef68 authored by Michael Schwarz's avatar Michael Schwarz

if click is from action table, highlight prod but not newline

parent 6b3d65b5
package de.tum.in.www2.cupplugin.editors;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
......@@ -44,12 +45,20 @@ public class Jumper {
// we currently only mark words if they are on the same line.
// otherwise we simply mark the whole line.
//TODO: Currently when clicking a reduce in action table, this highlights the line break as well
Position end = range.getEnd();
if (end != null && begin.getLine() == end.getLine()) {
from += begin.getColumn() - 1;
to = end.getColumn() - (begin.getColumn()-1);
try {
char c = mpe.getEditor().getDocument().getChar(end.getOffsetFromStart());
if(c == '\n'){
to--;
}
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if (lineInfo != null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment