Age | Commit message (Collapse) | Author |
|
Problem: Listener list not correctly updated on listener_remove().
Solution: Only set "prev" when not removing a listener. Return one if the
listener was found and removed.
|
|
Problem: ":write" increments b:changedtick even though nothing changed.
(Daniel Hahler)
Solution: Only increment b:changedtick if the modified flag is reset.
|
|
Problem: A listener change is merged even when it adds a line. (Paul Jolly)
Solution: Do not merge a change that adds or removes a line. (closes #4490)
|
|
Problem: Code to handle callbacks is duplicated.
Solution: Add callback_T and functions to deal with it.
|
|
Problem: Listener callbacks may be called recursively.
Solution: Set "updating_screen" while listener callbacks are invoked.
|
|
Problem: Alloc() returning "char_u *" causes a lot of type casts.
Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to
check the simple allocations.
|
|
Problem: Changes are not flushed when end and start overlap. (Paul Jolly)
Solution: When end of a previous changes overlaps with start of a new
change, first flush listeners.
|
|
Problem: Unessesary type casts for lalloc().
Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
|
|
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: Text property wrong after :substitute with backslash.
Solution: Adjust text property columns when removing backslashes.
(closes #4397)
|
|
Problem: Text property wrong after :substitute.
Solution: Save for undo before changing any text properties.
|
|
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: Listener callback is called after inserting text.
Solution: Flush the changes before inserting or deleting a line. Store
changes per buffer.
|
|
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.
|
|
Problem: It is not possible to track changes to a buffer.
Solution: Add listener_add() and listener_remove(). No docs or tests yet.
|
|
|