diff options
author | Pascal Kuthe | 2023-03-02 20:56:55 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-03-09 04:01:02 +0000 |
commit | e8898fd9a8ac8120827fb2d6f4752b3cb2431a62 (patch) | |
tree | bc6abc2aa663c7c31fa006bf14d3a59cc9269191 /helix-tui/tests/widgets_paragraph.rs | |
parent | 2588fa3710921683c16a84ffd91103a0823a033b (diff) |
store multiple snapshots on the document at once
Fixing autocomplete required moving the document savepoint before the
asynchronous completion request. However, this in turn causes new bugs:
If the completion popup is open, the savepoint is restored when the
popup closes (or another entry is selected). However, at that point
a new completion request might already have been created which
would have replaced the new savepoint (therefore leading to incorrectly
applied complies).
This commit fixes that bug by allowing in arbitrary number of
savepoints to be tracked on the document. The savepoints are reference
counted and therefore remain valid as long as any reference to them
remains. Weak reference are stored on the document and any reference
that can not be upgraded anymore (hence no strong reference remain)
are automatically discarded.
Diffstat (limited to 'helix-tui/tests/widgets_paragraph.rs')
0 files changed, 0 insertions, 0 deletions