Mark `linewrapping` `open_files` table as weak

We weren't correctly garbage-collecting `Doc`s, so we had `Highlighter`s 
stay alive over their due time.
This commit is contained in:
Guldoman 2023-05-24 04:23:27 +02:00 committed by takase1121
parent 6c17f6e2ee
commit 3febcf454c
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ local function get_line_col_from_index_and_x(docview, idx, x)
end
local open_files = {}
local open_files = setmetatable({ }, { __mode = "k" })
local old_doc_insert = Doc.raw_insert
function Doc:raw_insert(line, col, text, undo_stack, time)