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:
parent
b2a47a50fd
commit
07d7dd56b2
|
@ -26,6 +26,11 @@ from .signalman import Signalman
|
||||||
from . import plugin
|
from . import plugin
|
||||||
from terminatorlib.layoutlauncher import LayoutLauncher
|
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
|
# pylint: disable-msg=R0904
|
||||||
class Terminal(Gtk.VBox):
|
class Terminal(Gtk.VBox):
|
||||||
"""Class implementing the VTE widget and its wrappings"""
|
"""Class implementing the VTE widget and its wrappings"""
|
||||||
|
@ -142,7 +147,7 @@ class Terminal(Gtk.VBox):
|
||||||
self.vte.show()
|
self.vte.show()
|
||||||
|
|
||||||
self.default_encoding = self.vte.get_encoding()
|
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.update_url_matches()
|
||||||
|
|
||||||
self.terminalbox = self.create_terminalbox()
|
self.terminalbox = self.create_terminalbox()
|
||||||
|
|
Loading…
Reference in New Issue