[vte] emulation: Fix DECSTBM parameters
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Fix DECSTBM parameters
- Date: Tue, 27 Mar 2018 17:45:24 +0000 (UTC)
commit 02521cba6add9374f716b1e774a4943cccc626ad
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:13 2018 +0200
emulation: Fix DECSTBM parameters
The comment about requiring 2 lines was inaccurate;
xterm does not actually work like that.
https://bugzilla.gnome.org/show_bug.cgi?id=791451
src/vteseq.cc | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 371bbb1..60a30a8 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -3486,23 +3486,20 @@ VteTerminalPrivate::DECSTBM(vte::parser::Sequence const& seq)
seq.collect(0, {&start, &end});
/* Defaults */
- if (start == -1)
+ if (start <= 0)
start = 1;
if (end == -1)
end = m_row_count;
- /* Bail out on garbage, require at least 2 rows, as per xterm. */
- // FIXMEchpe
- if (start < 1 || start > m_row_count ||
- end < (start + 1)) {
+ if (start > m_row_count ||
+ end <= start) {
m_scrolling_restricted = FALSE;
home_cursor();
return;
}
- // FIXMEchpe why not reset here too?
- if (end > m_row_count) {
+
+ if (end > m_row_count)
end = m_row_count;
- }
/* Set the right values. */
m_scrolling_region.start = start - 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]