I want to apply changes to all selections, so I was trying to iterate over buffer.selection_n_anchor. However, using ipairs on it causes Textadept to crash.
- Open Command Entry and enter
for i,p in ipairs(buffer.selection_n_anchor) do end
- Textadept crashes
Also, for k,v in pairs(buffer.selection_n_anchor) do print(k,v) end prints
_self ta_buffer: 0000017FE97C5C20
_iface table: 0000017FE48CD770
Meaning pairs and ipairs are inconsistent.
It seems I can access arbitrary memory via this too; buffer.selection_n_anchor[150] gives e.g. 1648849914305 even though I have only one selection in an empty buffer.