[vte] terminal: Fix ::get_text start column not to be negative
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] terminal: Fix ::get_text start column not to be negative
- Date: Sun, 8 May 2016 06:59:39 +0000 (UTC)
commit d005d622f458f259919b35e448a985e2aabc7ecd
Author: Christian Persch <chpe gnome org>
Date: Sun May 8 08:59:09 2016 +0200
terminal: Fix ::get_text start column not to be negative
When the selection starts at the beginning of the line but
having been done by starting on the preceding line after the
end of text, the start column is -1, which would cause
::get_text() to lose the first line of the selected text.
Regression from commit 3696348c0b9c7d60caf7302411ec4c0298f56e57.
https://bugzilla.gnome.org/show_bug.cgi?id=765276
src/vte.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 23f2782..f73749c 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -6032,6 +6032,9 @@ VteTerminalPrivate::get_text(vte::grid::row_t start_row,
string = g_string_new(NULL);
memset(&attr, 0, sizeof(attr));
+ if (start_col < 0)
+ start_col = 0;
+
vte::grid::column_t next_first_column = block ? start_col : 0;
vte::grid::column_t col = start_col;
vte::grid::row_t row;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]