250907.3 · ce5a5fa2902933e7b4563ca78210254169463cb6
fix(win): ensure fzf have the same list height
fzf's previewer border is draw inside preview window, so shrink builtin previewer if it have "top border"
reading declarations
@@ -334,7 +334,10 @@ function FzfWin:generate_layout() pwopts.col = col pwopts.width = width -- https://github.com/junegunn/fzf/blob/1afd14381079a35eac0a4c2a5cacb86e2a3f476b/src/terminal.go#L1820- pwopts.height = math.floor(height * preview_size / 100)+ -- fzf's previewer border is draw inside preview window, so shrink builtin previewer if it have "top border"+ -- to ensure the fzf list height is the same between fzf/builtin+ local off = (self.previewer_is_builtin and ph > 0) and 1 or 0+ pwopts.height = math.floor((height + off) * preview_size / 100) - off height = height - pwopts.height if preview_pos == "down" then -- next row@@ -349,7 +352,8 @@ function FzfWin:generate_layout() else -- left|right pwopts.row = row pwopts.height = height- pwopts.width = math.floor(width * preview_size / 100)+ local off = (self.previewer_is_builtin and pw > 0) and 1 or 0+ pwopts.width = math.floor((width + off) * preview_size / 100) - off width = width - pwopts.width if preview_pos == "right" then -- next col
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'drop'-}
@@ -11,15 +11,15 @@ 10|n the r│ │ 11|to use,│ │se, an 12|d/or se│ │ -13|copies ╰─────────────────────────────────────────────────╯Softwa-14|re is ╭──────────────────── LICENSE ────────────────────╮ -15|furnish│ 1 MIT License -16| │ 2 -17|The abo│ 3 Copyright (c) 2021 iBhagwan l be i-18|ncluded│ 4 │ -19|copies │ 5 Permission is hereby granted, free of charge,│ -20| │ 6 of this software and associated documentation│ -21|THE SOF│ 7 in the Software without restriction, includin│KIND, +13|copies │ │Softwa+14|re is ╰─────────────────────────────────────────────────╯ +15|furnish╭──────────────────── LICENSE ────────────────────╮ +16| │ 1 MIT License +17|The abo│ 2 l be i+18|ncluded│ 3 Copyright (c) 2021 iBhagwan │ +19|copies │ 4 │ +20| │ 5 Permission is hereby granted, free of charge,│ +21|THE SOF│ 6 of this software and associated documentation│KIND, 22|EXPRESS╰─────────────────────────────────────────────────╯ 23|IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCH@@@ 24|LICENSE 1,1 Top
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'file_edit'-}
@@ -11,15 +11,15 @@ 10|n the r│ │ 11|to use,│ │se, an 12|d/or se│ │ -13|copies ╰─────────────────────────────────────────────────╯Softwa-14|re is ╭──────────────────── LICENSE ────────────────────╮ -15|furnish│ 1 MIT License -16| │ 2 -17|The abo│ 3 Copyright (c) 2021 iBhagwan l be i-18|ncluded│ 4 │ -19|copies │ 5 Permission is hereby granted, free of charge,│ -20| │ 6 of this software and associated documentation│ -21|THE SOF│ 7 in the Software without restriction, includin│KIND, +13|copies │ │Softwa+14|re is ╰─────────────────────────────────────────────────╯ +15|furnish╭──────────────────── LICENSE ────────────────────╮ +16| │ 1 MIT License +17|The abo│ 2 l be i+18|ncluded│ 3 Copyright (c) 2021 iBhagwan │ +19|copies │ 4 │ +20| │ 5 Permission is hereby granted, free of charge,│ +21|THE SOF│ 6 of this software and associated documentation│KIND, 22|EXPRESS╰─────────────────────────────────────────────────╯ 23|IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCH@@@ 24|LICENSE 1,1 Top
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'file_open_in_background'-}
@@ -11,15 +11,15 @@ 10|~ │ │ 11|~ │ │ 12|~ │ │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭──────────────────── LICENSE ────────────────────╮ -15|~ │ 1 MIT License -16|~ │ 2 -17|~ │ 3 Copyright (c) 2021 iBhagwan -18|~ │ 4 │ -19|~ │ 5 Permission is hereby granted, free of charge,│ -20|~ │ 6 of this software and associated documentation│ -21|~ │ 7 in the Software without restriction, includin│ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭──────────────────── LICENSE ────────────────────╮ +16|~ │ 1 MIT License +17|~ │ 2 +18|~ │ 3 Copyright (c) 2021 iBhagwan │ +19|~ │ 4 │ +20|~ │ 5 Permission is hereby granted, free of charge,│ +21|~ │ 6 of this software and associated documentation│ 22|~ ╰─────────────────────────────────────────────────╯ 23|~ 24|[No Name] 0,0-1 All
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'file_split'-}
@@ -11,15 +11,15 @@ 10|n the r│ │ 11|to use,│ │se,@@@ 12|LICENSE│ │ Top-13| ╰─────────────────────────────────────────────────╯ -14|~ ╭──────────────────── LICENSE ────────────────────╮ -15|~ │ 1 MIT License -16|~ │ 2 -17|~ │ 3 Copyright (c) 2021 iBhagwan -18|~ │ 4 │ -19|~ │ 5 Permission is hereby granted, free of charge,│ -20|~ │ 6 of this software and associated documentation│ -21|~ │ 7 in the Software without restriction, includin│ +13| │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭──────────────────── LICENSE ────────────────────╮ +16|~ │ 1 MIT License +17|~ │ 2 +18|~ │ 3 Copyright (c) 2021 iBhagwan │ +19|~ │ 4 │ +20|~ │ 5 Permission is hereby granted, free of charge,│ +21|~ │ 6 of this software and associated documentation│ 22|~ ╰─────────────────────────────────────────────────╯ 23|~ 24|[No Name] 0,0-1 All
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'file_tabedit'-}
@@ -11,15 +11,15 @@ 10|in the │ │itatio 11|n the r│ │ 12|to use,│ │se, an-13|d/or se╰─────────────────────────────────────────────────╯ -14|copies ╭──────────────────── LICENSE ────────────────────╮Softwa-15|re is │ 1 MIT License -16|furnish│ 2 -17| │ 3 Copyright (c) 2021 iBhagwan -18|The abo│ 4 │l be i-19|ncluded│ 5 Permission is hereby granted, free of charge,│ -20|copies │ 6 of this software and associated documentation│ -21| │ 7 in the Software without restriction, includin│ +13|d/or se│ │ +14|copies ╰─────────────────────────────────────────────────╯Softwa+15|re is ╭──────────────────── LICENSE ────────────────────╮ +16|furnish│ 1 MIT License +17| │ 2 +18|The abo│ 3 Copyright (c) 2021 iBhagwan │l be i+19|ncluded│ 4 │ +20|copies │ 5 Permission is hereby granted, free of charge,│ +21| │ 6 of this software and associated documentation│ 22|THE SOF╰─────────────────────────────────────────────────╯KIND, 23|EXPRESS OR 24|LICENSE 1,1 Top
tests/screenshots/tests-actions_spec.lua---actions---vimcmd---1-+-args-{-'file_vsplit'-}
@@ -11,15 +11,15 @@ 10|re"), t│ │ 11|in the │ │ 12|ion, in│ │ -13|n the r╰─────────────────────────────────────────────────╯ -14|to use,╭──────────────────── LICENSE ────────────────────╮ -15|lish, d│ 1 MIT License -16|d/or se│ 2 -17|copies │ 3 Copyright (c) 2021 iBhagwan -18|ermit p│ 4 │ -19|re is │ 5 Permission is hereby granted, free of charge,│ -20|furnish│ 6 of this software and associated documentation│ -21|he foll│ 7 in the Software without restriction, includin│ +13|n the r│ │ +14|to use,╰─────────────────────────────────────────────────╯ +15|lish, d╭──────────────────── LICENSE ────────────────────╮ +16|d/or se│ 1 MIT License +17|copies │ 2 +18|ermit p│ 3 Copyright (c) 2021 iBhagwan │ +19|re is │ 4 │ +20|furnish│ 5 Permission is hereby granted, free of charge,│ +21|he foll│ 6 of this software and associated documentation│ 22| ╰─────────────────────────────────────────────────╯ 23|The above copyright notice an@@@│~ 24|LICENSE 1,1 Top [No Name] 0,0-1 All
tests/screenshots/tests-files_spec.lua---files---line_query
@@ -11,13 +11,13 @@ 10|~ │ │ 11|~ │ │ 12|~ │ │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭──────────────────── LICENSE ────────────────────╮ -15|~ │ 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WAR│ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭──────────────────── LICENSE ────────────────────╮ 16|~ │ 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WAR│ 17|~ │ 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRI│ 18|~ │ 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR AN│ -19|~ │ 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +19|~ │ 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, │ 20|~ │ 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 21|~ │ 21 SOFTWARE. 22|~ ╰─────────────────────────────────────────────────╯
tests/screenshots/tests-files_spec.lua---files---preview-should-work-after-chdir-#1864
@@ -11,15 +11,15 @@ 10|~ │ README.md │ 11|~ │ autoload/fzf_lua.vim │ 12|~ │ autoload/health/fzf_lua.vim │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭─────────────────── Makefile ────────────────────╮ -15|~ │ 1 nvim ?= nvim -16|~ │ 2 │ -17|~ │ 3 # │ -18|~ │ 4 # Run all tests or specic module tests │ -19|~ │ 5 # │ -20|~ │ 6 # Test both stable and nightly (assuming `nv`│ -21|~ │ 7 # `make test nvim=nv` or `make test nvim="nvi│ +13|~ │ doc/fzf-lua-opts.txt │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭─────────────────── Makefile ────────────────────╮ +16|~ │ 1 nvim ?= nvim +17|~ │ 2 │ +18|~ │ 3 # │ +19|~ │ 4 # Run all tests or specic module tests │ +20|~ │ 5 # │ +21|~ │ 6 # Test both stable and nightly (assuming `nv`│ 22|~ ╰─────────────────────────────────────────────────╯ 23|~ 24|[No Name] 0,0-1 All
tests/screenshots/tests-files_spec.lua---files---previewer---builtin---1-+-args-{-false,-'builtin'-}
@@ -11,15 +11,15 @@ 10|~ │ README-Win.md │ 11|~ │ README.md │ 12|~ │ autoload/fzf_lua.vim │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭──────────────────── LICENSE ────────────────────╮ -15|~ │ 1 MIT License │ -16|~ │ 2 │ -17|~ │ 3 Copyright (c) 2021 iBhagwan │ -18|~ │ 4 │ -19|~ │ 5 Permission is hereby granted, free of charge,│ -20|~ │ 6 of this software and associated documentation│ -21|~ │ 7 in the Software without restriction, includin│ +13|~ │ autoload/health/fzf_lua.vim │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭──────────────────── LICENSE ────────────────────╮ +16|~ │ 1 MIT License │ +17|~ │ 2 │ +18|~ │ 3 Copyright (c) 2021 iBhagwan │ +19|~ │ 4 │ +20|~ │ 5 Permission is hereby granted, free of charge,│ +21|~ │ 6 of this software and associated documentation│ 22|~ ╰─────────────────────────────────────────────────╯ 23|~ 24|[No Name] 0,0-1 All
tests/screenshots/tests-files_spec.lua---files---previewer---builtin---1-+-args-{-false,-'ci'-}
@@ -11,10 +11,10 @@ 10|~ │ README-Win.md │ 11|~ │ README.md │ 12|~ │ autoload/fzf_lua.vim │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭─────────────────────LICENSE─────────────────────╮ -15|~ │ 1 SELECTED FILE: LICENSE │ -16|~ │ │ +13|~ │ autoload/health/fzf_lua.vim │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭─────────────────────LICENSE─────────────────────╮ +16|~ │ 1 SELECTED FILE: LICENSE │ 17|~ │ │ 18|~ │ │ 19|~ │ │
tests/screenshots/tests-files_spec.lua---files---previewer---builtin---1-+-args-{-true,-'builtin'-}
@@ -11,15 +11,15 @@ 10|~ │ README-Win.md │ 11|~ │ README.md │ 12|~ │ autoload/fzf_lua.vim │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭──────────────────── LICENSE ────────────────────╮ -15|~ │ 1 MIT License │ -16|~ │ 2 │ -17|~ │ 3 Copyright (c) 2021 iBhagwan │ -18|~ │ 4 │ -19|~ │ 5 Permission is hereby granted, free of charge,│ -20|~ │ 6 of this software and associated documentation│ -21|~ │ 7 in the Software without restriction, includin│ +13|~ │ autoload/health/fzf_lua.vim │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭──────────────────── LICENSE ────────────────────╮ +16|~ │ 1 MIT License │ +17|~ │ 2 │ +18|~ │ 3 Copyright (c) 2021 iBhagwan │ +19|~ │ 4 │ +20|~ │ 5 Permission is hereby granted, free of charge,│ +21|~ │ 6 of this software and associated documentation│ 22|~ ╰─────────────────────────────────────────────────╯ 23|~ 24|[No Name] 0,0-1 All
tests/screenshots/tests-files_spec.lua---files---previewer---builtin---1-+-args-{-true,-'ci'-}
@@ -11,10 +11,10 @@ 10|~ │ README-Win.md │ 11|~ │ README.md │ 12|~ │ autoload/fzf_lua.vim │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭─────────────────────LICENSE─────────────────────╮ -15|~ │ 1 SELECTED FILE: LICENSE │ -16|~ │ │ +13|~ │ autoload/health/fzf_lua.vim │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭─────────────────────LICENSE─────────────────────╮ +16|~ │ 1 SELECTED FILE: LICENSE │ 17|~ │ │ 18|~ │ │ 19|~ │ │
tests/screenshots/tests-grep_spec.lua---grep---search---regex---1-+-args-{-false-}
@@ -11,9 +11,9 @@ 10|~ │ ↳ '"\\/\$\?'\''`\*&&\|\|;\[]<>\)' │ 11|~ │▌ tests/grep_spec.lua:32:21: search = [== │ 12|~ │▌ ↳ =[(~'"\/$?'`*&&||;[]<>) --tests/grep*]===], │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭───────────────── grep_spec.lua ─────────────────╮ -15|~ │ 29 helpers.FzfLua.grep(child, { │ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭───────────────── grep_spec.lua ─────────────────╮ 16|~ │ 30 __expect_lines = true, │ 17|~ │ 31 __screen_opts = screen_opts, │ 18|~ │ 32 search = [===[(~'"\/$?'`*&&||;[]<>) --t│
tests/screenshots/tests-grep_spec.lua---grep---search---regex---1-+-args-{-true-}
@@ -11,9 +11,9 @@ 10|~ │ ↳ '"\\/\$\?'\''`\*&&\|\|;\[]<>\)' │ 11|~ │▌ tests/grep_spec.lua:32:21: search = [== │ 12|~ │▌ ↳ =[(~'"\/$?'`*&&||;[]<>) --tests/grep*]===], │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭───────────────── grep_spec.lua ─────────────────╮ -15|~ │ 29 helpers.FzfLua.grep(child, { │ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭───────────────── grep_spec.lua ─────────────────╮ 16|~ │ 30 __expect_lines = true, │ 17|~ │ 31 __screen_opts = screen_opts, │ 18|~ │ 32 search = [===[(~'"\/$?'`*&&||;[]<>) --t│
tests/screenshots/tests-win_spec.lua---win---previewer---toggle_behavior=extend---1-+-args-{-{winopts-=-{border-=-false}}-}
@@ -11,9 +11,9 @@ 10|~ 11|~ 12|~ -13|~ ╭───────────────────────foo───────────────────────╮ -14|~ │ 1 SELECTED FILE: foo │ -15|~ │ │ +13|~ +14|~ ╭───────────────────────foo───────────────────────╮ +15|~ │ 1 SELECTED FILE: foo │ 16|~ │ │ 17|~ │ │ 18|~ │ │
tests/screenshots/tests-win_spec.lua---win---previewer---toggle_behavior=extend---1-+-args-{-{}-}
@@ -11,8 +11,8 @@ 10|~ │ │ 11|~ │ │ 12|~ │ │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ 15|~ 16|~ 17|~
tests/screenshots/tests-win_spec.lua---win---previewer---toggle_behavior=extend---1-+-args-{-{}-}-002
@@ -11,10 +11,10 @@ 10|~ │ │ 11|~ │ │ 12|~ │ │ -13|~ ╰─────────────────────────────────────────────────╯ -14|~ ╭───────────────────────foo───────────────────────╮ -15|~ │ 1 SELECTED FILE: foo │ -16|~ │ │ +13|~ │ │ +14|~ ╰─────────────────────────────────────────────────╯ +15|~ ╭───────────────────────foo───────────────────────╮ +16|~ │ 1 SELECTED FILE: foo │ 17|~ │ │ 18|~ │ │ 19|~ │ │