diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java index 233fcd598c..3582c4ad95 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java @@ -2,7 +2,7 @@ * 12/21/2004 * * ConfigurableCaret.java - The caret used by RTextArea. - * + * * This library is distributed under a modified BSD license. See the included * RSyntaxTextArea.License.txt file for details. */ @@ -159,7 +159,7 @@ public class ConfigurableCaret extends DefaultCaret { textArea.isRequestFocusEnabled()) { if (inWindow) textArea.requestFocusInWindow(); - else + else textArea.requestFocus(); } } @@ -458,7 +458,8 @@ public class ConfigurableCaret extends DefaultCaret { Graphics2D g2 = (Graphics2D) g; g2.setStroke(new BasicStroke(2)); // 向右再移动一个位置 避免光标太接近文字内容 - g2.draw(new Line2D.Float(r.x + 1, r.y, r.x + 1, r.y + r.height)); + // REPORT-41895 光标上方超出背景高亮的部分不会闪烁,会形成一个停留的小点,因此将光标的超出部分截去 + g2.draw(new Line2D.Float(r.x + 1, r.y + 1, r.x + 1, r.y + r.height)); break; } // End of switch (style). @@ -676,7 +677,7 @@ public class ConfigurableCaret extends DefaultCaret { if (line