Skip to content

Commit

Permalink
diffMap: minor current line background layout fixes, fix NPE in LineDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillp committed Dec 17, 2024
1 parent a48f61c commit ff2dc90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ else if (diffModel != null && i < diffModel.length && diffModel[i] != null && !d

drawVerticalLine();

if (drawGap) drawGap(firstLine, lastLine, docLen);
if (!mirrored)
drawGap(firstLine, lastLine, docLen);

if (hasFocus && caretX >= -caret.width() / 2 && caret.needsPaint(size)) {
caret.paint(g, pos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public String toString() {
}

public static boolean notEmpty(LineDiff[] diff) {
return diff != null && (diff.length > 1 || diff[0].type != 0);
return diff != null && (diff.length > 1 || (diff[0] != null && diff[0].type != 0));
}
}

0 comments on commit ff2dc90

Please sign in to comment.