Don't say it's rendering the cursor where it's just setting the position

This commit is contained in:
Heath Mitchell 2023-01-27 15:00:00 +00:00
parent 580e5e8369
commit 4bf538e880
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ void text_layout(struct TeX_Node *node, TEX_UNUSED int display)
void text_render(struct TeX_Node const * node, struct editContext * context, int x, int y, int color)
{
if (context != NULL && context->elementIsText && context->cursorText == node) {
// Render a cursor
// Set the cursor position
// Temporarily cap the length of the string to the cursor position
char old = node->text[context->offset + 1];
node->text[context->offset + 1] = '\0';

View File

@ -488,7 +488,7 @@ void TeX_flow_render(struct TeX_Flow const * flow, struct editContext * context,
{
if (context != NULL && !context->elementIsText && context->cursorFlow == flow && context->offset == offset)
{
// Render a cursor
// Set the cursor position
context->cursorX = x + node->x;
context->cursorY = y + flow->line - 4;
}
@ -500,7 +500,7 @@ void TeX_flow_render(struct TeX_Flow const * flow, struct editContext * context,
if (context != NULL && !context->elementIsText &&context->cursorFlow == flow && context->offset == offset)
{
// Render a cursor
// Set the cursor position
context->cursorX = x + flow->width;
context->cursorY = y + flow->line - 4;
}