diff options
-rwxr-xr-x | contrib/fzy-tmux | 2 | ||||
-rw-r--r-- | fzy.1 | 4 | ||||
-rw-r--r-- | src/fzy.c | 8 |
3 files changed, 11 insertions, 3 deletions
diff --git a/contrib/fzy-tmux b/contrib/fzy-tmux index ba7c146..3ddf57b 100755 --- a/contrib/fzy-tmux +++ b/contrib/fzy-tmux @@ -23,7 +23,7 @@ main() { fatal "Unable to create a temporary directory" fi - mkfifo "${PATH_FIFO_IN}" "${PATH_FIFO_OUT}" + mkfifo "${PATH_FIFO_IN}" "${PATH_FIFO_OUT}" "${PATH_FIFO_RET}" export TMUX=$(_echo "${TMUX}" | cut -d , -f 1,2) eval "tmux \ @@ -41,6 +41,10 @@ Use QUERY as the initial search query. Non-interactive mode. Print the matches in sorted order for QUERY to stdout. . .TP +.BR \-0 ", " \-\-read-null +Read input delimited by ASCII NUL characters. +. +.TP .BR \-h ", " \-\-help Usage help. . @@ -53,8 +53,12 @@ int main(int argc, char *argv[]) { if (options.num_lines > choices.size) options.num_lines = choices.size; - if (options.num_lines + 1 > tty_getheight(&tty)) - options.num_lines = tty_getheight(&tty) - 1; + int num_lines_adjustment = 1; + if (options.show_info) + num_lines_adjustment++; + + if (options.num_lines + num_lines_adjustment > tty_getheight(&tty)) + options.num_lines = tty_getheight(&tty) - num_lines_adjustment; tty_interface_t tty_interface; tty_interface_init(&tty_interface, &tty, &choices, &options); |