From 97b3f33919b25014c61b3bc29356fc9fb89e3dfb Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 29 Oct 2013 16:48:26 +0900 Subject: [PATCH] Fix nil string error --- fzf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fzf b/fzf index 4a605afa..aa473ccb 100755 --- a/fzf +++ b/fzf @@ -167,7 +167,7 @@ def cursor_y; C.lines - 1; end def cprint str, col C.attron(col) do C.addstr str - end + end if str end def print_input @@ -443,7 +443,7 @@ searcher = Thread.new { C.addstr line[0, b] cprint line[b...e], color(chosen ? :match! : :match, chosen) C.attron basic - C.addstr line[e..-1] + C.addstr line[e..-1] || '' else C.addstr line end