AmendHub

Download (as of this amendment):

jcs

/

textview

/

amendments

/

87

TVCalcLinesLocked: Add parens in indent calculation


jcs made amendment 87 23 days ago
--- tv_layout.c Thu Oct 15 09:52:52 2026 +++ tv_layout.c Mon Nov 2 15:14:46 2026 @@ -289,11 +289,11 @@ reload_chunk: line->rect.right = chunk->end_right; if (style->align == TV_ALIGN_CENTER) - line->indent = (max_right - line->rect.right - - line->rect.left) / 2; + line->indent = (max_right - (line->rect.right - + line->rect.left)) / 2; else if (style->align == TV_ALIGN_RIGHT) - line->indent = max_right - line->rect.right - - line->rect.left; + line->indent = max_right - (line->rect.right - + line->rect.left); else line->indent = 0; @@ -357,10 +357,11 @@ reload_chunk: chunk->need_recalc = false; if (style->align == TV_ALIGN_CENTER) - line->indent = (max_right - line->rect.right - - line->rect.left) / 2; + line->indent = (max_right - (line->rect.right - + line->rect.left)) / 2; else if (style->align == TV_ALIGN_RIGHT) - line->indent = max_right - line->rect.right - line->rect.left; + line->indent = max_right - (line->rect.right - + line->rect.left); else line->indent = 0; }