vim: refactor get_message_for_line out of show_message_id