• 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
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.codecov.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...