There is a small type safety issue here because the function takes any TStrings descendant but actually it'll only work with TSynEditStringList.
I'd propose a patch but the problem is that TSynEdit.Lines itself returns TStrings, this is messy...so this could break some 3rd party code.
Perhaps that a cast and a TException could prevent the error, even if not not good for the performance.
An assertion maybe, so that users could detect the problem when testing.
What do you think Martin fr ?