From dcf49c7341eac680838edd4358814b42d07bfa7c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 17 Sep 2014 19:09:11 +0100 Subject: Improve textarea layout comments to explain the non-obvious bits better. --- desktop/textarea.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'desktop') 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 */ -- cgit v1.2.3