[vte/vte-0-52] emulation: Ensure the cursor remains onscreen when moving down
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-52] emulation: Ensure the cursor remains onscreen when moving down
- Date: Fri, 11 Oct 2019 10:57:14 +0000 (UTC)
commit da0b9a03b34a7054acffec83bc4be66f4e0dc1a9
Author: Egmont Koblinger <egmont gmail com>
Date: Tue Sep 24 13:01:54 2019 +0200
emulation: Ensure the cursor remains onscreen when moving down
Previously the cursor could escape from the onscreen area, resulting in
a crash. This happened when a scrolling area was defined which did not
include the bottom row, the cursor was in the terminal's bottom row and
moved downwards from there.
https://gitlab.gnome.org/GNOME/vte/issues/176
(cherry picked from commit ef0734c1eb775cf98db9a6e8e87700830b1a3890)
src/vte.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 70bf13b0..5b08feb9 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -2863,8 +2863,9 @@ VteTerminalPrivate::cursor_down(bool explicit_sequence)
VteRowData *rowdata = ensure_row();
_vte_row_data_fill (rowdata, &m_fill_defaults, m_column_count);
}
- } else {
- /* Otherwise, just move the cursor down. */
+ } else if (m_screen->cursor.row < m_screen->insert_delta + m_row_count - 1) {
+ /* Otherwise, just move the cursor down; unless it's already in the last
+ * physical row (which is possible with scrolling region, see #176). */
m_screen->cursor.row++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]