From 8783bea06e1e0dfa8dfd4834058923088471d832 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 11 Jan 2021 13:29:37 -0500 Subject: feat: quickfix (#293) * feat: quickfix (not implemented) * [WIP]: Wed 09 Dec 2020 11:11:30 PM EST * somewhat working linked list impl * getting closer * might be working * might be working for real * works and implemented basic example * dont forget to close prompt * fix descending and add more tests * test fixes * fix test * more logging * Fix some more tests * Fix logging messing up tests * fix: lint * fix: multi select stuffs --- lua/tests/automated/scroller_spec.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lua/tests/automated/scroller_spec.lua') diff --git a/lua/tests/automated/scroller_spec.lua b/lua/tests/automated/scroller_spec.lua index f47edda..dcc55a0 100644 --- a/lua/tests/automated/scroller_spec.lua +++ b/lua/tests/automated/scroller_spec.lua @@ -99,7 +99,16 @@ describe('scroller', function() it('should stay at current results when current results is less than max_results', function() local current = 5 - eq(current - 1, limit_scroller(max_results, current, 4)) + eq(max_results - current, limit_scroller(max_results, current, 4)) + end) + end) + + describe('https://github.com/nvim-telescope/telescope.nvim/pull/293#issuecomment-751463224', function() + it('should handle having many more results than necessary', function() + local scroller = p_scroller.create('cycle', 'descending') + + -- 23 112 23 + eq(0, scroller(23, 112, 23)) end) end) end) -- cgit v1.2.3