Add change-border-label and change-preview-label actions, update man

This commit is contained in:
jpcrs
2023-01-17 18:43:02 +00:00
committed by Junegunn Choi
parent b077f6821d
commit c3d73e7ecb
3 changed files with 15 additions and 1 deletions

View File

@@ -306,6 +306,8 @@ const (
actBackwardDeleteCharEOF
actBackwardWord
actCancel
actChangeBorderLabel
actChangePreviewLabel
actChangePrompt
actChangeQuery
actClearScreen
@@ -2909,6 +2911,12 @@ func (t *Terminal) Loop() {
case actChangeQuery:
t.input = []rune(a.a)
t.cx = len(t.input)
case actChangeBorderLabel:
t.borderLabel, t.borderLabelLen = t.ansiLabelPrinter(a.a, &tui.ColBorderLabel, false)
req(reqFullRedraw)
case actChangePreviewLabel:
t.previewLabel, t.previewLabelLen = t.ansiLabelPrinter(a.a, &tui.ColPreviewLabel, false)
req(reqFullRedraw)
case actChangePrompt:
t.prompt, t.promptLen = t.parsePrompt(a.a)
req(reqPrompt)