summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-09-17 19:09:11 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-09-18 16:00:31 +0100
commitdcf49c7341eac680838edd4358814b42d07bfa7c (patch)
treed583d687c5ec156f88a712cb137d50fe614730db
parent2dc8459c84e368c9b1f68b981b36da1bd921ea78 (diff)
downloadnetsurf-dcf49c7341eac680838edd4358814b42d07bfa7c.tar.gz
netsurf-dcf49c7341eac680838edd4358814b42d07bfa7c.tar.bz2
Improve textarea layout comments to explain the non-obvious bits better.
-rw-r--r--desktop/textarea.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 6a959d539..a1e46ddab 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -954,11 +954,15 @@ static bool textarea_reflow_multiline(struct textarea *ta,
if (start != 0)
start--;
+ /* During layout we may decide we need to restart again from the
+ * textarea's first line. */
do {
- /* Set line count to start point */
+ /* If a vertical scrollbar has been added or removed, we need
+ * to restart from the first line in the textarea. */
if (restart)
start = 0;
+ /* Set current line to the starting line */
line = start;
/* Find available width */