summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgmont Koblinger <egmont@gmail.com>2015-03-30 23:19:46 +0200
committerEgmont Koblinger <egmont@gmail.com>2015-03-30 23:22:19 +0200
commit68dece621fb183eb9f0b3105448d417852215615 (patch)
tree732d1e5f8cd008d79f2543ea3cbefbfa37cf2586
parent48def907eadfc5200603ebded4fb99ff324e571e (diff)
downloadvte-0.36.4.tar.gz
emulation: Fix vertical positioning after resize in some rare cases0.36.4
https://bugzilla.gnome.org/show_bug.cgi?id=747059 (cherry picked from commit 41d2e152878cc35d78a4dd8feb7cad52f088cdf9) Conflicts: src/vte.c
-rw-r--r--doc/rewrap.txt10
-rw-r--r--src/vte.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/rewrap.txt b/doc/rewrap.txt
index 35bc2c8b..71592485 100644
--- a/doc/rewrap.txt
+++ b/doc/rewrap.txt
@@ -253,14 +253,14 @@ the lines (if necessary) after rewrapping, but before computing the new
scrollbar offsets, and we drop the highest number of lines that satisfies all
these three conditions:
- - We shouldn't drop more lines than necessary to fit the content without
- scrollbars.
+ - drop1: We shouldn't drop more lines than necessary to fit the content
+ without scrollbars.
- - We should only drop data that's below the cursor's paragraph. (We don't
- drop data that is under the cursor's row, but belongs to the same
+ - drop2: We should only drop data that's below the cursor's paragraph. (We
+ don't drop data that is under the cursor's row, but belongs to the same
paragraph).
- - We track the character cell that immediately follows the cursor's
+ - drop3: We track the character cell that immediately follows the cursor's
paragraph (that is, the line after this paragraph, first column), and see
how much it would get closer to the top of the window (assuming viewport is
scrolled to the bottom). The original bug is about that the cursor
diff --git a/src/vte.c b/src/vte.c
index 9f95fe3b..689124ac 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8193,7 +8193,7 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
screen->insert_delta = _vte_ring_next(ring) - terminal->row_count;
new_top_lines = below_current_paragraph.row - screen->insert_delta;
drop1 = _vte_ring_length(ring) - terminal->row_count;
- drop2 = _vte_ring_length(ring) - below_current_paragraph.row;
+ drop2 = _vte_ring_next(ring) - below_current_paragraph.row;
drop3 = old_top_lines - new_top_lines;
drop = MIN(MIN(drop1, drop2), drop3);
if (drop > 0) {