tty_buffer fix distinct type warning