mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 02:31:45 +02:00
Enable use of higher options for underlining text.
In `Colored and styled underlines` it's proposed that the SGR codes \e[4:4m and \e[4:5m are used to add a dotted or dashed underline to the rendering context respectively. This commit prepares the necessary changes to add the two additional underline style, while still rendering them as a normal underline and curly underline.
This commit is contained in:
@@ -313,7 +313,7 @@ def render_special(
|
||||
t = underline_thickness
|
||||
if underline > 1:
|
||||
t = max(1, min(cell_height - underline_position - 1, t))
|
||||
dl([add_line, add_line, add_dline, add_curl][underline], underline_position, t, cell_height)
|
||||
dl([add_line, add_line, add_dline, add_curl, add_line, add_curl][underline], underline_position, t, cell_height)
|
||||
if strikethrough:
|
||||
dl(add_line, strikethrough_position, strikethrough_thickness, cell_height)
|
||||
|
||||
@@ -384,7 +384,7 @@ def prerender_function(
|
||||
render_cursor, cursor_beam_thickness=cursor_beam_thickness,
|
||||
cursor_underline_thickness=cursor_underline_thickness, cell_width=cell_width,
|
||||
cell_height=cell_height, dpi_x=dpi_x, dpi_y=dpi_y)
|
||||
cells = f(1), f(2), f(3), f(0, True), f(missing=True), c(1), c(2), c(3)
|
||||
cells = f(1), f(2), f(3), f(4), f(5), f(0, True), f(missing=True), c(1), c(2), c(3)
|
||||
return tuple(map(ctypes.addressof, cells)), cells
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user