Loads of changes including fixes, new functionality, and optimisation.

+ Refactor internals to be byte, rather than character based.
    + Don't need to hammer utf8_* functions everywhere
    + Optimises:
        + Redraw (lots)
        + Editing (insertion, replacement, removal)
        + Caret placement
        + Selection
+ Early avoid of zero length autoscroll during selection drag.
+ Optimised redraw to avoid nsfont_width when:
    + There's no selection at all.
    + We're on last part of line, and it's unselected.
+ Implemented WORD_LEFT and WORD_RIGHT keys (shift + cursor left/right)
+ Fixed UP and DOWN (cursor up/down) keys to handle non-monospace fonts.
  (Now based on 'x' offset on line, rather than character offset on line.)
+ Fixed PAGE_UP and PAGE_DOWN to scroll without moving the caret.
+ Fixed redraw bug in text selection edge case.
+ Changed textarea_replace_text and textarea_insert_text to return
  a byte delta for caret position changes.
+ Coordinate to text offset function handles global and viewport coords.
+ Many small improvements and tidying.
This commit is contained in:
Michael Drake 2013-03-17 22:06:48 +00:00
parent c3f21572ed
commit 8d0c1f9207

File diff suppressed because it is too large Load Diff