mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Merge branch 'master' of https://github.com/ahlinc/kitty
This commit is contained in:
commit
09fbd6f5e0
3 changed files with 6 additions and 3 deletions
|
|
@ -15,6 +15,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||
- Add an option :opt:`confirm_on_os_window_close` to ask for confirmation
|
||||
when closing an OS window with multiple kitty windows.
|
||||
|
||||
- Fix marks using different colors with regexes using only a single color
|
||||
(:pull:`2663`)
|
||||
|
||||
|
||||
0.17.4 [2020-05-09]
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ def parse_marker_spec(ftype: str, parts: Sequence[str]) -> Tuple[str, Union[str,
|
|||
def toggle_marker(func: str, rest: str) -> FuncArgsType:
|
||||
parts = rest.split(maxsplit=1)
|
||||
if len(parts) != 2:
|
||||
raise ValueError('{} if not a valid marker specification'.format(rest))
|
||||
raise ValueError('{} is not a valid marker specification'.format(rest))
|
||||
ftype, spec = parts
|
||||
parts = spec.split()
|
||||
return func, list(parse_marker_spec(ftype, parts))
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ def marker_from_multiple_regex(regexes: Iterable[Tuple[int, str]], flags: int =
|
|||
for match in pat.finditer(text):
|
||||
left.value = match.start()
|
||||
right.value = match.end() - 1
|
||||
grp = next(k for k, v in match.groupdict().items())
|
||||
color.value = color_map[grp]
|
||||
grp = match.lastgroup
|
||||
color.value = color_map[grp] if grp is not None else 0
|
||||
yield
|
||||
|
||||
return marker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue