diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 3ac07a47290c0d73d577d3c062c79855808faeca..f6bab4c08bd299537719cfec37c9793089cf5946 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -323,10 +323,10 @@ e.g. \fBfzf --expect=ctrl-v,ctrl-t,alt-s,f1,f2,~,@\fR .RE .TP .B "--read0" -Read input delimited by ASCII NUL character instead of newline character +Read input delimited by ASCII NUL characters instead of newline characters .TP .B "--print0" -Print output delimited by ASCII NUL character instead of newline character +Print output delimited by ASCII NUL characters instead of newline characters .TP .B "--sync" Synchronous search for multi-staged filtering. If specified, fzf will launch diff --git a/src/options.go b/src/options.go index 2e96c2c52aec0e41eebd6c819d5544b364a663b8..9d8bb8980b6155bf3527438f979b5b7b0e18d0d9 100644 --- a/src/options.go +++ b/src/options.go @@ -82,6 +82,8 @@ const usage = `usage: fzf [options] -f, --filter=STR Filter mode. Do not start interactive finder. --print-query Print query as the first line --expect=KEYS Comma-separated list of keys to complete fzf + --read0 Read input delimited by ASCII NUL characters + --print0 Print output delimited by ASCII NUL characters --sync Synchronous search for multi-staged filtering Environment variables diff --git a/src/terminal.go b/src/terminal.go index d06f75218bd323a9bd87dcd593738aa70131f802..081f7156aa240521bf731d5e225b083c327a41d0 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -847,6 +847,7 @@ func (t *Terminal) printHighlighted(result *Result, attr tui.Attr, col1 tui.Colo offsets[idx].offset[1] = util.Min32(offset.offset[1], int32(maxWidth)) } } + displayWidth = t.displayWidthWithLimit(text, 0, displayWidth) } var index int32