Commit 0f01429
fix(editor): prevent freeze when replacing newline characters
Add position advancement check in updateKeywordSelectionsInView
while loop to prevent infinite loop when keyword contains newline.
在 updateKeywordSelectionsInView 的 while 循环中添加光标位置推进检查,
防止搜索关键词包含换行符时因光标未前进而导致死循环。
Log: 修复替换换行符时编辑器卡死的问题
PMS: BUG-332113
Influence: 修复后使用替换功能替换换行符不再导致编辑器卡死,替换功能恢复正常。1 parent 3d50789 commit 0f01429
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2446 | 2446 | | |
2447 | 2447 | | |
2448 | 2448 | | |
| 2449 | + | |
2449 | 2450 | | |
2450 | 2451 | | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
2451 | 2461 | | |
2452 | 2462 | | |
2453 | 2463 | | |
| |||
2465 | 2475 | | |
2466 | 2476 | | |
2467 | 2477 | | |
2468 | | - | |
| 2478 | + | |
2469 | 2479 | | |
2470 | 2480 | | |
2471 | 2481 | | |
| |||
0 commit comments