File tree 1 file changed +6
-5
lines changed
src/main/java/org/fife/ui/rsyntaxtextarea 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -946,11 +946,12 @@ else if (y > alloc.y + alloc.height) {
946
946
else {
947
947
948
948
Element map = doc .getDefaultRootElement ();
949
+ lineHeight = host !=null ? host .getLineHeight () : lineHeight ;
949
950
int lineIndex = Math .abs ((y - alloc .y ) / lineHeight );//metrics.getHeight() );
950
- FoldManager fm = host .getFoldManager ();
951
- //System.out.print("--- " + lineIndex);
952
- lineIndex += fm .getHiddenLineCountAbove (lineIndex , true );
953
- //System.out.println(" => " + lineIndex);
951
+ FoldManager fm = host .getFoldManager ();
952
+ //System.out.print("--- " + lineIndex);
953
+ lineIndex += fm .getHiddenLineCountAbove (lineIndex , true );
954
+ //System.out.println(" => " + lineIndex);
954
955
if (lineIndex >= map .getElementCount ()) {
955
956
return host .getLastVisibleOffset ();
956
957
}
@@ -1019,4 +1020,4 @@ public int yForLineContaining(Rectangle alloc, int offs)
1019
1020
}
1020
1021
1021
1022
1022
- }
1023
+ }
You can’t perform that action at this time.
0 commit comments