Don't allocate memory for none shown messages.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 14 Jun 2017 20:59:08 +0000 (22:59 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 14 Jun 2017 20:59:08 +0000 (22:59 +0200)
commit58ebc46370a9f55e4d798aafc404b147ac7c44ca
tree06742abba7432916e0d44a7dd4b7bb124b7309db
parentf9ce5ccd4e2943c77cab03c3bb9ec21fe49f6c9d
Don't allocate memory for none shown messages.

The logic that decided if a message could be written to input box was in
input_print() which is called with newly allocated and prepared message
string. But in case the widget is focused and we do not intend a forced
update the string preparation was in vain.
So do the check if the input could be written before allocating any
memory.
src/main.c