diff options
author | Michael Davis | 2022-05-11 00:53:54 +0000 |
---|---|---|
committer | GitHub | 2022-05-11 00:53:54 +0000 |
commit | 247ab25bc04b75fede667bc2736c8449e8608714 (patch) | |
tree | fddee157ac1b02389194a1cad6ecc45a4a11ac50 /helix-dap/src/lib.rs | |
parent | e0b5cdfb477108a5cbd40afd9384a96b50d46fbb (diff) |
prefer Document::set_selection to inserting selections directly (#2411)
Inserting these with the `HashMap::insert` method evades the call
to `Selection::ensure_invariants`. The effect is that the scratch
buffer (or other buffers opened through these code-paths) can start
with a selection at (0, 0), when a file with equivalent contents ("\n")
would start with (0, 1).
I.e.:
hx
and
touch f
hx f
start with different selections even though they have an equivalent
Rope. With this change they both start with (0, 1).
Diffstat (limited to 'helix-dap/src/lib.rs')
0 files changed, 0 insertions, 0 deletions