Term must begin at start of buffer

Initialize the index passed into the macro to 0. These macros should be
removed in the future.
Add support for notifications when stdin is closed