• stuartmorgan's avatar
    Handle surrogate pairs in RenderEditable (#55246) · 1cad96a6
    stuartmorgan authored
    The arrow key and delete handling in RenderEditable was using single
    index values, which made it possible to move the cursor into the middle
    of a surrogate pair (allowing things like adding text at that insertion
    point), or to delete half of a surrogate pair. Since unpaired surrogate
    pairs aren't valid UTF-16, doing so would cause assertions in the text
    field.
    
    This makes the arrow key and delete key handling surrogate-aware
    (although not grapheme-cluster-aware, which is a larger fix that is out
    of scope here).
    
    Part of #55014
    1cad96a6
Name
Last commit
Last update
..
lib Loading commit data...
test Loading commit data...
BUILD.gn Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
build.yaml Loading commit data...
pubspec.yaml Loading commit data...