mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
0102ffbfca
Follow-up of https://github.com/zed-industries/zed/pull/6947 (cc @alygin) that fixes a few style nits and refactors the code around: * use already stored `currently_opened_path` to decide what to do with the history item sorting * use the same method to set history items, encapsulate the bubbling up logic there * ensure history elements are properly sorted before populating The main reason to change all that is the new comparator in the previous version: https://github.com/zed-industries/zed/pull/6947/files#diff-eac7c8c99856f77cee39117708cd1467fd5bbc8805da2564f851951638020842R234 that almost violated `util::extend_sorted` contract, requiring both collections to be sorted the same way as the comparator would be: it did work, because we bubbled currently open item up in the history items list manually, and that we have only one such item. Release Notes: - N/A |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |