// Need the full match line to correctly calculate replace text, if this is a search/replace with regex group references ($1, $2, ...).
// 10000 chars is enough to avoid sending huge amounts of text around, if you do a replace with a longer match, it may or may not resolve the group refs correctly.