https://bugs.kde.org/show_bug.cgi?id=407103
Christoph Cullmann <cullm...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|CONFIRMED |RESOLVED Latest Commit| |https://commits.kde.org/kat | |e/2fdd8c14268e8af93e6515d91 | |6db6e72cccc7a7b --- Comment #38 from Christoph Cullmann <cullm...@kde.org> --- Git commit 2fdd8c14268e8af93e6515d916db6e72cccc7a7b by Christoph Cullmann. Committed on 10/07/2019 at 17:59. Pushed by cullmann into branch 'master'. [PATCH] Quick Open: fix LRU listing regression The quick open list used to be sorted by order of access (the old code called it LRU order). Commit d6e38c0cbd3d6d7f76 broke this. The first sort() call is changed to stable_sort() in order to preserve the "bold" field and the new "sort_id" field. A comment warns about this subtle and easy to break requirement. This change was needed to sort the file list by LRU (files not in the sortedViews list have no sort_id set, and thus are sorted below all LRU sorted entries). stable_sort() should be slower than sort(), although the C++ standard promises the same algorithmic complexity. On the other hand, this change also lets us get rid of the openedUrls string list and the associated linear search. The second sort must always be a stable_sort(). This is a bug in the previous code. It sorted only on the "bold" field, which means everything else can be reordered as sort() likes. Even if it "worked", it was buggy. To completely restore the old behavior, select the second entry by default in the quick open list. This is so that you can quickly switch between the two last recently accessed files. The old code actually selected the first entry if the sortedViews list contained less than 2 elements - keep that behavior too. Author: Vincent Lang M +5 -1 kate/katequickopen.cpp M +13 -16 kate/katequickopenmodel.cpp M +1 -0 kate/katequickopenmodel.h https://commits.kde.org/kate/2fdd8c14268e8af93e6515d916db6e72cccc7a7b -- You are receiving this mail because: You are watching all bug changes.