prompt: teach read_prompt_incremental() to allow empty input
commit395b2c3be8fd3f922aac66e598b593030daeed8f
authorEric Sunshine <sunshine@sunshineco.com>
Thu, 9 Apr 2015 08:37:20 +0000 (9 04:37 -0400)
committerJonas Fonseca <jonas.fonseca@gmail.com>
Thu, 9 Apr 2015 11:44:31 +0000 (9 07:44 -0400)
tree59b6a0195d3f8ff799babea7d98dc59e3bfdf004
parent718c6e94fcc111e5607d6ca0bf3d15271adc0d97
prompt: teach read_prompt_incremental() to allow empty input

Although the common input idiom in tig is to treat empty input the same
as input cancellation, some future callers may need to treat an empty
line as valid input. Support such usage by teaching
read_prompt_incremental() to accept an 'allow_empty' argument.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jonas Fonseca <jonas.fonseca@gmail.com>
include/tig/prompt.h
src/prompt.c
src/tig.c
src/ui.c