Skip to content

Commit

Permalink
Only skip cursor if it exists
Browse files Browse the repository at this point in the history
If the cursor is not visible then we'd end up blinking the last
character on the screen. And if the screen was empty we'd spew the logs
with GL errors.
  • Loading branch information
SquidDev committed Nov 23, 2024
1 parent 5e24ad1 commit 9a06904
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ private static void renderTerminal(
foregroundBuffer.drawWithShader(
matrix, RenderSystem.getProjectionMatrix(), RenderTypes.getTerminalShader(),
// Skip the cursor quad if it is not visible this frame.
FixedWidthFontRenderer.isCursorVisible(terminal) && FrameInfo.getGlobalCursorBlink()
? foregroundBuffer.getIndexCount()
: foregroundBuffer.getIndexCount() - RenderTypes.TERMINAL.mode().indexCount(4)
FixedWidthFontRenderer.isCursorVisible(terminal) && !FrameInfo.getGlobalCursorBlink()
? foregroundBuffer.getIndexCount() - RenderTypes.TERMINAL.mode().indexCount(4)
: foregroundBuffer.getIndexCount()
);

// Clear state
Expand Down

0 comments on commit 9a06904

Please sign in to comment.