Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by jpcrs · committed by Junegunn Choi · parent b077f68 · Browse files · 3 files+15 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+15 added−1 removed

  • other:+15 added−1 removed

3 files+15 added−1 removed

modified:man/man1/fzf.1+2 added
983 unmodified lines
984 \fBbeginning-of-line\fR \fIctrl-a home\fR985 \fBcancel\fR (clear query string if not empty, abort fzf otherwise)986 \fBchange-preview(...)\fR (change \fB--preview\fR option)987 \fBchange-preview-window(...)\fR (change \fB--preview-window\fR option; rotate through the multiple option sets separated by '|')988 \fBchange-preview-label(...)\fR (change \fB--preview-label\fR to the given string)989 \fBchange-prompt(...)\fR (change prompt to the given string)990 \fBchange-border-label(...)\fR (change \fB--border-label\fR to the given string) 991 \fBchange-query(...)\fR (change query string to the given string)992 \fBclear-screen\fR \fIctrl-l\fR993 \fBclear-selection\fR (clear multi-selection)994 \fBclose\fR (close preview window if open, abort fzf otherwise)
210 unmodified lines
modified:src/options.go+5 added-1 removed
910 unmodified lines
911)912913func init() {914 executeRegexp = regexp.MustCompile(915 `(?si)[:+](execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt)|change-preview-window|change-preview|(?:re|un)bind|pos|put)`)915 `(?si)[:+](execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt)|change-preview-window|change-preview-label|change-border-label|change-preview|(?:re|un)bind|pos|put)`)916 splitRegexp = regexp.MustCompile("[,:]+")917 actionNameRegexp = regexp.MustCompile("(?i)^[a-z-]+")918}919
303 unmodified lines
1223 case "change-preview-window":1224 return actChangePreviewWindow1225 case "change-preview":1226 return actChangePreview1227 case "change-preview-label":1228 return actChangePreviewLabel1229 case "change-prompt":1230 return actChangePrompt1231 case "change-border-label":1232 return actChangeBorderLabel1233 case "change-query":1234 return actChangeQuery1235 case "pos":1236 return actPosition
789 unmodified lines
modified:src/terminal.go+8 added
304 unmodified lines
305 actBackwardDeleteChar306 actBackwardDeleteCharEOF307 actBackwardWord308 actCancel309 actChangeBorderLabel310 actChangePreviewLabel311 actChangePrompt312 actChangeQuery313 actClearScreen314 actClearQuery
2595 unmodified lines
2910 req(reqPrintQuery)2911 case actChangeQuery:2912 t.input = []rune(a.a)2913 t.cx = len(t.input)2914 case actChangeBorderLabel:2915 t.borderLabel, t.borderLabelLen = t.ansiLabelPrinter(a.a, &tui.ColBorderLabel, false)2916 req(reqFullRedraw)2917 case actChangePreviewLabel:2918 t.previewLabel, t.previewLabelLen = t.ansiLabelPrinter(a.a, &tui.ColPreviewLabel, false)2919 req(reqFullRedraw)2920 case actChangePrompt:2921 t.prompt, t.promptLen = t.parsePrompt(a.a)2922 req(reqPrompt)2923 case actPreview:
598 unmodified lines