Convenient loop API to print styled strings

This commit is contained in:
Kovid Goyal
2023-03-13 09:39:35 +05:30
parent 6794ec1de7
commit ffb3b073d7
2 changed files with 20 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ func new_loop() *Loop {
l.escape_code_parser.HandlePM = l.handle_pm
l.escape_code_parser.HandleRune = l.handle_rune
l.escape_code_parser.HandleEndOfBracketedPaste = l.handle_end_of_bracketed_paste
l.style_cache = make(map[string]func(...any) string)
l.style_ctx.AllowEscapeCodes = true
return &l
}