Put the following code in init.lua, save and restart Textadept, then press ctrl+1. A new buffer is created as expected, but the tab label is "Untitled" instead of "Test Buffer". When you switch to that tab the Textadept window title changes to "Test Buffer - Textadept (Test Buffer)", but the tab label remains "Untitled".
keys['ctrl+1'] = function() ui.print_silent_to('Test Buffer', 'hello') end
If you use the command entry to inspect the tab you get the following
Put the following code in init.lua, save and restart Textadept, then press ctrl+1. A new buffer is created as expected, but the tab label is "Untitled" instead of "Test Buffer". When you switch to that tab the Textadept window title changes to "Test Buffer - Textadept (Test Buffer)", but the tab label remains "Untitled".
If you use the command entry to inspect the tab you get the following
As soon as you edit the content of the tab, the tab_label correctly updates to "Test Buffer" via the SAVE_POINT_LEFT event handler.
I think the issue is around here. Nothing is triggering a call to
set_tab_label()
for the new buffer. https://github.com/orbitalquark/textadept/blob/81180915559448f60101f1d3da61819b40591e83/core/ui.lua#L72Note:
ui.print_to()
does not have this issue.Thanks for all the work you've put into Textadept over the years.