src/main/java/dev/lambdaurora/spruceui/widget/text/SpruceTextAreaWidget.java
protected void drawCursor(MatrixStack matrices) {
        if (!this.isFocused())
            return;
        if (this.lines.isEmpty()) {
            drawTextWithShadow(matrices, this.textRenderer, new LiteralText("_"), this.getX(), this.getY() + 4, ColorUtil.TEXT_COLOR);
            return;
        }

        this.cursor.sanitize();

        int actualRow = this.cursor.row - firstLine;
        String cursorLine = this.lines.get(this.cursor.row);
        int cursorX = this.getX() + 4 + this.textRenderer.getWidth(cursorLine.substring(0, this.cursor.column));
        int cursorY = this.getY() + 4 + actualRow * this.textRenderer.fontHeight;

        if (this.cursor.row < this.lines.size() - 1 || this.cursor.column < cursorLine.length() || this.doesLineOccupyFullSpace(cursorLine))
            fill(matrices, cursorX - 1, cursorY - 1, cursorX, cursorY + 9, ColorUtil.TEXT_COLOR);
        else
            this.textRenderer.drawWithShadow(matrices, "_", cursorX, cursorY, ColorUtil.TEXT_COLOR);
    }
/**
     * Draws the cursor.
     *
     * @param matrices the matrices
     */
Draws the cursor.
@param matrices the matrices
Draws the cursor . @param matrices the matrices
protected void drawCursor(MatrixStack matrices) {
        if (!this.isFocused())
            return;
        if (this.lines.isEmpty()) {
            drawTextWithShadow(matrices, this.textRenderer, new LiteralText("_"), this.getX(), this.getY() + 4, ColorUtil.TEXT_COLOR);
            return;
        }
        this.cursor.sanitize();
        int actualRow = this.cursor.row - firstLine;
        String cursorLine = this.lines.get(this.cursor.row);
        int cursorX = this.getX() + 4 + this.textRenderer.getWidth(cursorLine.substring(0, this.cursor.column));
        int cursorY = this.getY() + 4 + actualRow * this.textRenderer.fontHeight;
        if (this.cursor.row < this.lines.size() - 1 || this.cursor.column < cursorLine.length() || this.doesLineOccupyFullSpace(cursorLine))
            fill(matrices, cursorX - 1, cursorY - 1, cursorX, cursorY + 9, ColorUtil.TEXT_COLOR);
        else
            this.textRenderer.drawWithShadow(matrices, "_", cursorX, cursorY, ColorUtil.TEXT_COLOR);
    }
protected void drawCursor ( MatrixStack matrices ) { if ( ! this . isFocused ( ) ) return ; if ( this . lines . isEmpty ( ) ) { drawTextWithShadow ( matrices , this . textRenderer , new LiteralText ( "_" ) , this . getX ( ) , this . getY ( ) + 4 , ColorUtil . TEXT_COLOR ) ; return ; } this . cursor . sanitize ( ) ; int actualRow = this . cursor . row - firstLine ; String cursorLine = this . lines . get ( this . cursor . row ) ; int cursorX = this . getX ( ) + 4 + this . textRenderer . getWidth ( cursorLine . substring ( 0 , this . cursor . column ) ) ; int cursorY = this . getY ( ) + 4 + actualRow * this . textRenderer . fontHeight ; if ( this . cursor . row < this . lines . size ( ) - 1 || this . cursor . column < cursorLine . length ( ) || this . doesLineOccupyFullSpace ( cursorLine ) ) fill ( matrices , cursorX - 1 , cursorY - 1 , cursorX , cursorY + 9 , ColorUtil . TEXT_COLOR ) ; else this . textRenderer . drawWithShadow ( matrices , "_" , cursorX , cursorY , ColorUtil . TEXT_COLOR ) ; }
Draws the cursor.
Draws the cursor .