Commit 185ca1a
authored
fix: handle URIs with encoded spaces in applyEdit [IDE-1555] (#746)
* fix: handle URIs with encoded spaces in applyEdit [IDE-1555]
- Replace VirtualFileManager.findFileByUrl() with toVirtualFileOrNull()
which properly decodes URL-encoded characters (e.g., %20 to spaces)
- Add debug logging to applyEdit and DocumentChanger to trace URI handling
- Fixes issue where applyEdit failed for paths containing spaces, dots, and underscores
The issue was that findFileByUrl() doesn't handle URL-encoded URIs.
Using toVirtualFileOrNull() converts the URI to a path first, which
automatically decodes %20 to spaces, then finds the file using the decoded path.
* refactor: use modern logger pattern in DocumentChanger
Replace Logger.getInstance() with logger<DocumentChanger>() to match
the pattern used throughout the codebase1 parent c75fffd commit 185ca1a
1 file changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
| |||
0 commit comments