Closed paretje closed 3 years ago
Regarding the Codacy failure: the SearchBuffer.rebuild
function signature already differed before, supporting the reverse
keyword argument. I guess I could rename rebuild
to _rebulld
, and defining rebuild
to call _rebuild
, and use the internal _rebuild
when we want some specific behaviour while performing a jump.
Thanks! I think this is a great solution. I was not able to talk codacity into ignoring the issue. IMO that issue is unproblematic because if ever called from outside contexts, the one or zero-parameter invocation still works as expected because you added a sensible default value to the new parameter.
As discussed in #1561, I added an option to configure the maximum number of results before using the reverse order heuristic for
move last
. I kept the default at200
, althoughsearch_threads_rebuild_limit
is unlimited by default, as we do have the heuristic approach as a fallback.I also disabled restoring focus after the building the reversed threadlist, as that is limited by
search_threads_rebuild_limit
, making this heuristic pointless by default, as you still load the whole threadbuffer, while getting an inexact order. And even whensearch_threads_rebuild_limit
is set to a different value, it would still be unnecessarily slow.