|
|
|
@ -22,9 +22,11 @@ import java.awt.event.MouseEvent;
|
|
|
|
|
import java.awt.event.MouseListener; |
|
|
|
|
import java.awt.event.MouseMotionListener; |
|
|
|
|
import javax.swing.JTextArea; |
|
|
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
|
import javax.swing.event.CaretEvent; |
|
|
|
|
import javax.swing.plaf.ColorUIResource; |
|
|
|
|
import javax.swing.plaf.TextUI; |
|
|
|
|
import javax.swing.plaf.basic.BasicBorders; |
|
|
|
|
import javax.swing.text.AbstractDocument; |
|
|
|
|
import javax.swing.text.BadLocationException; |
|
|
|
|
import javax.swing.text.Caret; |
|
|
|
@ -645,7 +647,7 @@ int currentCaretY; // Used to know when to rehighlight current line.
|
|
|
|
|
setTabsEmulated(false); |
|
|
|
|
|
|
|
|
|
// Stuff needed by the caret listener below.
|
|
|
|
|
setMargin(getInsets()); |
|
|
|
|
setBorder(new BasicBorders.MarginBorder()); |
|
|
|
|
previousCaretY = currentCaretY = getInsets().top; |
|
|
|
|
|
|
|
|
|
// Stuff to highlight the current line.
|
|
|
|
|