Commit 78b4419
authored
fix(ios): prevent crash when deleting mixed selection or using IME input (#277)
Always update _lastSelectedRange in textViewDidChangeSelection and
textInputDidChangeSelection before the isApplyingFormatting guard,
ensuring _preEditSelectedRange is never stale when handleTextChanged
computes edit parameters. Also clamp modificationRange passed to the
detector pipeline so out-of-bounds values cannot reach ENRMWordsUtils.
Made-with: Cursor1 parent 98d17a4 commit 78b4419
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
| 1094 | + | |
| 1095 | + | |
1094 | 1096 | | |
1095 | | - | |
| 1097 | + | |
1096 | 1098 | | |
1097 | 1099 | | |
1098 | 1100 | | |
| |||
1184 | 1186 | | |
1185 | 1187 | | |
1186 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1187 | 1193 | | |
1188 | 1194 | | |
1189 | 1195 | | |
1190 | 1196 | | |
1191 | | - | |
1192 | 1197 | | |
1193 | | - | |
1194 | | - | |
| 1198 | + | |
1195 | 1199 | | |
1196 | 1200 | | |
1197 | 1201 | | |
| |||
1263 | 1267 | | |
1264 | 1268 | | |
1265 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
1266 | 1272 | | |
1267 | 1273 | | |
1268 | 1274 | | |
1269 | | - | |
1270 | 1275 | | |
1271 | 1276 | | |
1272 | 1277 | | |
| |||
0 commit comments