Lines 52-57
Link Here
|
52 |
import javax.swing.text.Element; |
52 |
import javax.swing.text.Element; |
53 |
import javax.swing.text.JTextComponent; |
53 |
import javax.swing.text.JTextComponent; |
54 |
import javax.swing.text.Position; |
54 |
import javax.swing.text.Position; |
|
|
55 |
import javax.swing.text.Position.Bias; |
55 |
import javax.swing.text.View; |
56 |
import javax.swing.text.View; |
56 |
import javax.swing.text.ViewFactory; |
57 |
import javax.swing.text.ViewFactory; |
57 |
import org.netbeans.editor.view.spi.EstimatedSpanView; |
58 |
import org.netbeans.editor.view.spi.EstimatedSpanView; |
Lines 894-898
Link Here
|
894 |
} |
895 |
} |
895 |
|
896 |
|
896 |
} // End of FragmentView class |
897 |
} // End of FragmentView class |
897 |
|
898 |
|
|
|
899 |
// #164820 |
900 |
@Override |
901 |
public int getNextVisualPositionFrom(int pos, Bias b, Shape a, int direction, Bias[] biasRet) throws BadLocationException { |
902 |
|
903 |
switch (direction) { |
904 |
case WEST: |
905 |
{ |
906 |
pos = super.getNextVisualPositionFrom(pos, b, a, direction, biasRet); |
907 |
char[] chars = getDocument().getText(pos, 1).toCharArray(); |
908 |
if (chars.length > 0 && Character.isLowSurrogate(chars[0])) { |
909 |
// Supplementary character |
910 |
return super.getNextVisualPositionFrom(pos, b, a, direction, biasRet); |
911 |
} |
912 |
} |
913 |
break; |
914 |
|
915 |
case EAST: |
916 |
{ |
917 |
pos = super.getNextVisualPositionFrom(pos, b, a, direction, biasRet); |
918 |
char[] chars = getDocument().getText(pos, 1).toCharArray(); |
919 |
if (chars.length > 0 && Character.isLowSurrogate(chars[0])) { |
920 |
// Supplementary character |
921 |
return super.getNextVisualPositionFrom(pos, b, a, direction, biasRet); |
922 |
} |
923 |
} |
924 |
break; |
925 |
|
926 |
default: |
927 |
pos = super.getNextVisualPositionFrom(pos, b, a, direction, biasRet); |
928 |
break; |
929 |
} |
930 |
|
931 |
return pos; |
932 |
} |
933 |
|
898 |
} |
934 |
} |