terminal: Add MULTILINE flag for regex

To avoid _vte_regex_has_multiline_compile_flag warning.

There is no exported constant to Python for setting the flag, so we use
a local.
This commit is contained in:
Markus Frosch 2020-04-05 18:58:03 +02:00
parent b2a47a50fd
commit 07d7dd56b2
1 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,11 @@ from .signalman import Signalman
from . import plugin
from terminatorlib.layoutlauncher import LayoutLauncher
# constant for vte matching
# TODO: Please replace with a proper reference to VTE, I found none!
PCRE2_MULTILINE = 0x00000400
# pylint: disable-msg=R0904
class Terminal(Gtk.VBox):
"""Class implementing the VTE widget and its wrappings"""
@ -142,7 +147,7 @@ class Terminal(Gtk.VBox):
self.vte.show()
self.default_encoding = self.vte.get_encoding()
self.regex_flags = Vte.REGEX_FLAGS_DEFAULT
self.regex_flags = (Vte.REGEX_FLAGS_DEFAULT | PCRE2_MULTILINE)
self.update_url_matches()
self.terminalbox = self.create_terminalbox()