mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 17:27:39 +02:00
Allow passing multiple options to control how wrapping is done
This commit is contained in:
@@ -488,7 +488,7 @@ func lines_for_context_chunk(data *DiffData, hunk_num int, chunk *Chunk, chunk_n
|
||||
}
|
||||
|
||||
func splitlines(text string, width int) []string {
|
||||
return style.WrapTextAsLines(text, "", width)
|
||||
return style.WrapTextAsLines(text, width, style.WrapOptions{})
|
||||
}
|
||||
|
||||
func render_half_line(line_number int, line, ltype string, available_cols int, center Center, ans []HalfScreenLine) []HalfScreenLine {
|
||||
|
||||
@@ -339,7 +339,7 @@ func (self *handler) draw_screen() {
|
||||
sz, _ := self.lp.ScreenSize()
|
||||
|
||||
write_help := func(x string) {
|
||||
lines := style.WrapTextAsLines(x, "", int(sz.WidthCells)-1)
|
||||
lines := style.WrapTextAsLines(x, int(sz.WidthCells)-1, style.WrapOptions{})
|
||||
for _, line := range lines {
|
||||
if line != "" {
|
||||
writeln(self.dim_formatter(line))
|
||||
|
||||
Reference in New Issue
Block a user