1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00

Keyboard navigation doesn't work right unless there's a null token to end the line.

https://www.filebot.net/forums/viewtopic.php?f=6&t=9511&p=40230#p40230
This commit is contained in:
Reinhard Pointner 2018-12-02 01:48:10 +07:00
parent eb8c5d850b
commit f6efdbced8

View File

@ -66,15 +66,15 @@ public class FormatExpressionTokenMaker extends TokenMakerBase {
switch (getLanguageIndex()) {
case LANGUAGE_GROOVY:
if (start != end) {
// keyboard navigation doesn't work right unless there's a null token to end the line
if (start <= end) {
Segment groovySegment = new Segment(segment.array, segment.getBeginIndex() + start, end - start);
addToken(groovyTokenMaker.getTokenList(groovySegment, initialTokenType, startOffset + start));
}
addNullToken(); // keyboard navigation doesn't work right unless there's a null token to end the line
addLevelToken(level);
break;
default:
if (start != end) {
if (start < end) {
addToken(segment, segment.getBeginIndex() + start, segment.getBeginIndex() + end - 1, Token.MARKUP_CDATA, startOffset + start);
}
addNullToken();