Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/f58a2580e0ea35d4b38f7...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/f58a2580e0ea35d4b38f771...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/f58a2580e0ea35d4b38f771f1...
The branch, master has been updated
via f58a2580e0ea35d4b38f771f152215713fbd72b0 (commit)
from c3d6099250475d40a8b5c9c548ac8858e9d7b5ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=f58a2580e0ea35d4b38...
commit f58a2580e0ea35d4b38f771f152215713fbd72b0
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fix textarea wrap bug.
Was comparing against the current start line length, to decide if it
needed redrawing, without taking into account that old start line
might have been longer.
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 82f0989..d29e5f2 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -915,6 +915,7 @@ static bool textarea_reflow_multiline(struct textarea *ta,
unsigned int len;
unsigned int start;
size_t b_off;
+ size_t b_start_line_end;
int x;
char *space, *para_end;
unsigned int line; /* line count */
@@ -954,6 +955,9 @@ static bool textarea_reflow_multiline(struct textarea *ta,
if (start != 0)
start--;
+ /* Record original end pos of start line */
+ b_start_line_end = ta->lines[start].b_start + ta->lines[start].b_length;
+
/* During layout we may decide we need to restart again from the
* textarea's first line. */
do {
@@ -1156,9 +1160,15 @@ static bool textarea_reflow_multiline(struct textarea *ta,
ta->v_extent = v_extent;
ta->line_count = line;
+ /* Update start line end byte pos, if it's increased */
+ if (ta->lines[start].b_start + ta->lines[start].b_length >
+ b_start_line_end) {
+ b_start_line_end = ta->lines[start].b_start +
+ ta->lines[start].b_length;
+ }
+
/* Don't need to redraw above changes, so update redraw request rect */
- if (ta->lines[start].b_start + ta->lines[start].b_length < b_start &&
- restart == false) {
+ if (b_start_line_end < b_start && restart == false) {
/* Start line is unchanged */
start++;
skip_line = true;
-----------------------------------------------------------------------
Summary of changes:
desktop/textarea.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 82f0989..d29e5f2 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -915,6 +915,7 @@ static bool textarea_reflow_multiline(struct textarea *ta,
unsigned int len;
unsigned int start;
size_t b_off;
+ size_t b_start_line_end;
int x;
char *space, *para_end;
unsigned int line; /* line count */
@@ -954,6 +955,9 @@ static bool textarea_reflow_multiline(struct textarea *ta,
if (start != 0)
start--;
+ /* Record original end pos of start line */
+ b_start_line_end = ta->lines[start].b_start + ta->lines[start].b_length;
+
/* During layout we may decide we need to restart again from the
* textarea's first line. */
do {
@@ -1156,9 +1160,15 @@ static bool textarea_reflow_multiline(struct textarea *ta,
ta->v_extent = v_extent;
ta->line_count = line;
+ /* Update start line end byte pos, if it's increased */
+ if (ta->lines[start].b_start + ta->lines[start].b_length >
+ b_start_line_end) {
+ b_start_line_end = ta->lines[start].b_start +
+ ta->lines[start].b_length;
+ }
+
/* Don't need to redraw above changes, so update redraw request rect */
- if (ta->lines[start].b_start + ta->lines[start].b_length < b_start &&
- restart == false) {
+ if (b_start_line_end < b_start && restart == false) {
/* Start line is unchanged */
start++;
skip_line = true;
--
NetSurf Browser