Moved most of buffer_process_char into it's own function in bufwin called bufwin_process_char