The source of this bug is that under certain conditions, it is possible
for a document title to be changed before the buffer constructor has run
to completion. This causes tab_bar_update_buffer_title to get run before
tab_bar_add_buffer has been run, so buffer.tab does not yet exist.
The solution to this problem is to ensure that tab_bar_add_buffer runs as
early as possible during buffer construction instead of at the very end.
To implement this solution, a new hook, `create_buffer_early_hook' will be
added to the buffer subsystem, which runs early enough to avoid the timing
problems associated with title-setting, but late enough that basic
properties of the buffer will be available to hook functions.
|