Problem: Using "int" for alloc() often results in compiler warnings.
Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim
only works with 32 bit ints anyway.
Problem: Coverity complains about possibly using a NULL pointer and copying
a string into a fixed size buffer.
Solution: Check for NULL, even though it should not happen. Use
vim_strncpy() instead of strcpy().
Problem: Text properties don't always move after changes.
Solution: Update properties before reporting changes to listeners. Move text
property when splitting a line.
Problem: Cannot flush change listeners without also redrawing. The line
numbers in the list of changes may become invalid.
Solution: Add listener_flush(). Invoke listeners before adding a change
that makes line numbers invalid.
Problem: No docs or tests for listener functions.
Solution: Add help and tests for listener_add() and listener_remove().
Invoke the callbacks before redrawing.