Apparently, spellchecking was preventing some people from porting their applications to GTK 4. So I spent a little time today extracting Text Editor’s spellcheck engine into a library you can use in your GTK 4 application without having to write fun data-structures on your own.
It’s slightly different since I have to avoid putting code in subclasses of
GtkTextBuffer, but it should work nonetheless.
It does benefit from GtkSourceView from git though, as I added a new function to avoid doing work while buffers are loading (as Text Editor does).