kogmbh/WebODF — pull request #767 by peitschie (2014-08-08 07:32:11+00:00)
Title: Always update every caret on a processing batch end

The Caret itself already has logic to only perform expensive updates once per redraw. There is no performance gained by CaretManager duplicating this logic as well.

In addition, bind to any processing batch end. This is because any type of edit may cause the caret to be pushed off screen including adding annotations, splitting paragraphs, deleting text, modifying a paragraph style etc. the most straightforward way to ensure the caret is up-to-date is to check it's visibility on every edit operation.

Fixes #765

Other commits
* Always update caret location even if it isn't visible
* Put caret register/remove functions side-by-side for clarity