Commit 9c2e8d0
fix: scroll-then-click places cursor at clicked position
Capture document position at mousedown time via posAtCoords and use
it when collapsing accidental selections. Previously used selection.to
which could be the old cursor position when scrolling upward, causing
the view to jump back to the wrong location.
Also removed aggressive scroll restoration that could conflict with
CodeMirror's internal scroll management.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e28188c commit 9c2e8d0
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| |||
365 | 367 | | |
366 | 368 | | |
367 | 369 | | |
368 | | - | |
369 | 370 | | |
370 | 371 | | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | 372 | | |
377 | 373 | | |
378 | 374 | | |
| |||
386 | 382 | | |
387 | 383 | | |
388 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| |||
0 commit comments