Add new dotted and dashed underline enum
Also use "straight" for single underline, consistent with the protocol extension document.
This commit is contained in:
parent
17e31565e2
commit
a47aca6fdb
@ -170,7 +170,7 @@ STANDARD_COLORS = {name: i for i, name in enumerate(
|
|||||||
'black red green yellow blue magenta cyan gray'.split())}
|
'black red green yellow blue magenta cyan gray'.split())}
|
||||||
STANDARD_COLORS['white'] = STANDARD_COLORS['gray']
|
STANDARD_COLORS['white'] = STANDARD_COLORS['gray']
|
||||||
UNDERLINE_STYLES = {name: i + 1 for i, name in enumerate(
|
UNDERLINE_STYLES = {name: i + 1 for i, name in enumerate(
|
||||||
'straight double curly'.split())}
|
'straight double curly dotted dashed'.split())}
|
||||||
|
|
||||||
|
|
||||||
ColorSpec = Union[int, str, Color]
|
ColorSpec = Union[int, str, Color]
|
||||||
|
|||||||
@ -360,7 +360,7 @@ opt('url_color', '#0087bd',
|
|||||||
option_type='to_color', ctype='color_as_int',
|
option_type='to_color', ctype='color_as_int',
|
||||||
long_text='''
|
long_text='''
|
||||||
The color and style for highlighting URLs on mouse-over. :code:`url_style` can
|
The color and style for highlighting URLs on mouse-over. :code:`url_style` can
|
||||||
be one of: none, single, double, curly
|
be one of: none, straight, double, curly, dotted, dashed
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -501,11 +501,14 @@ def scrollback_pager_history_size(x: str) -> int:
|
|||||||
|
|
||||||
|
|
||||||
def url_style(x: str) -> int:
|
def url_style(x: str) -> int:
|
||||||
|
# for backwards compat
|
||||||
|
if x == 'single':
|
||||||
|
x = 'straight'
|
||||||
return url_style_map.get(x, url_style_map['curly'])
|
return url_style_map.get(x, url_style_map['curly'])
|
||||||
|
|
||||||
|
|
||||||
url_style_map = {
|
url_style_map = {
|
||||||
v: i for i, v in enumerate('none single double curly'.split())
|
v: i for i, v in enumerate('none straight double curly dotted dashed'.split())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user