In Textadept 12 try this.
Open any file and then go to Tools > Quick Open > Quickly Open User Home, to open init.lua, which should be empty.
Notice in the status bar it says "Spaces: 2" to indicate the tab width is 2.
Now put buffer.tab_width = 3 in init.lua and save it.
Perform a reset by typing reset in the command entry and pressing enter.
In the status bar it says "Spaces: 3"
Now switch to the other file you had open and the status bar will still show "Spaces: 2", but it should say 3 not 2.
The default buffer properties are not applied to all buffers after a reset, only the active buffer.
To fix this I added the following event handler at the very end of _HOME/init.lua
events.connect(events.RESET_AFTER, function()
local orig_buffer = _G.buffer
for _, b in ipairs(_BUFFERS) do
_G.buffer = b
load_buffer_settings()
end
_G.buffer = orig_buffer
end, 1) -- the 1 is needed otherwise any RESET_AFTER handler in the user's init.lua will run before this
In Textadept 12 try this. Open any file and then go to Tools > Quick Open > Quickly Open User Home, to open init.lua, which should be empty. Notice in the status bar it says "Spaces: 2" to indicate the tab width is 2. Now put
buffer.tab_width = 3
in init.lua and save it. Perform a reset by typingreset
in the command entry and pressing enter. In the status bar it says "Spaces: 3" Now switch to the other file you had open and the status bar will still show "Spaces: 2", but it should say 3 not 2.The default buffer properties are not applied to all buffers after a reset, only the active buffer.
To fix this I added the following event handler at the very end of _HOME/init.lua
I tested this on a nightly from 7th May.