[vte] widget: Allow regexes to match spaces



commit c68a546e0b70128987c392d8e140f809fd809902
Author: Egmont Koblinger <egmont gmail com>
Date:   Wed Jan 31 23:01:21 2018 +0100

    widget: Allow regexes to match spaces
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792729

 src/vte.cc |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 5a36bcf..7e077c1 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -1274,8 +1274,7 @@ VteTerminalPrivate::match_rowcol_to_offset(vte::grid::column_t column,
                        eattr = offset;
                }
                if (row == attr->row &&
-                   column == attr->column &&
-                   m_match_contents[offset] != ' ') {
+                   column == attr->column) {
                        break;
                }
        }
@@ -1300,10 +1299,9 @@ VteTerminalPrivate::match_rowcol_to_offset(vte::grid::column_t column,
        }
 
        /* If the pointer is on a newline, bug out. */
-       if ((g_ascii_isspace(m_match_contents[offset])) ||
-           (m_match_contents[offset] == '\0')) {
+       if (m_match_contents[offset] == '\0') {
                _vte_debug_print(VTE_DEBUG_EVENTS,
-                                 "Cursor is on whitespace.\n");
+                                 "Cursor is on newline.\n");
                return false;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]