The cursor layout uses winline() and wincol() to calculate the cursor
position. Both these functions operate on the currently active window.
The first time the calculations are performed, that happens to be the
window active before showing the Telescope window. However, if the
editor is then resized or the preview window is toggled, the active
window changes. The result is that recalculating the position is then
done using the wrong window, resulting in the Telescope window moving
around in an erratic manner.
To fix this, we have to scope the winline() and wincol() calls to the
original window ID.
* fix(notify): don't report request on new line
* ref(notify): update message format
* ref(msgs): always quote values + decrease duplication
* fix(ci): undefined variables
* ref(actions): temporary silent actions.__index errors
* cleanup
* revert: panic effort, we continue to use error for those
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
* Change center layout strategy to allow vertical anchoring
Affects `telescope.pickers.layout_strategies.center` that is used by dropdown
(`telescope.themes.get_dropdown()`) theme, allowing more customization for
dropdown theme, i. e. setting it in the top with mirrored preview.
For `anchor` containing `N` or `S` will ignore `mirror` config
and preview will be placed as follows:
- Anchoring for `N` put the preview below the prompt result block.
- Anchoring for `S` put the preview above the prompt result block.
- For horizontal anchoring preview will be placed according to `mirror`.
* [docgen] Update doc/telescope.txt
skip-checks: true
Co-authored-by: Github Actions <actions@github>
* wip: 2021-07-22 15:00 BST
* wip: `horizontal` refactored
* wip: `center` refactored
* wip: `cursor` and `vertical` refactored
* wip: `current_buffer` refactor
- also changed `layout_config_defaults` as they gave errors when using `current_buffer`
* wip: `bottom_pane` refactor
* [docgen] Update doc/telescope.txt
skip-checks: true
* fix: put accidentally remove config option back
* [docgen] Update doc/telescope.txt
skip-checks: true
* wip: standardise `height` calculation for `center` and `bottom_pane`
* wip: improve comments
* [docgen] Update doc/telescope.txt
skip-checks: true
* stylua
- also fix a merge mistake
* [docgen] Update doc/telescope.txt
skip-checks: true
* fix: attempt to fix bad merge
* refactor: remove unused entry in `borderchars` table
- also fix some typos
* wip: tweak padding for `bottom_pane`
* wip: add `tabline` checks to `bottom_pane`
- also tweaked position so that `statusline` is not covered when borders are enabled
* stylua
* refactor: factor out size capping function
* [docgen] Update doc/telescope.txt
skip-checks: true
* fix: adjust tests that relied on height being number of results
* fix: forgot variable in calc_size_and_spacing
* fix: maybe this fixes these tests?
* test: try other plenary branch for ci
* test: switch back to main plenary branch for ci
* fix: actually define `max_results` in the test
* fix: final tweaks for edge cases
Co-authored-by: Github Actions <actions@github>
* fix: check if tabline is present when calculating certain layouts
- also tweaks height calculation for `center` strategy
* refactor: remove `center` strategy tweak
- will reimplement something similar in another PR for a few of the strategies
* fix: check if `preview.line` is `nil`
* refactor: factor out `tbln` calculation and `max_lines` adjustment
- also tweaked `vertical` calculations so that no `nil` check is required
* something kind of works already
* yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya
* use async for everything besides live jobs
* fix: fixup autocmds previewer
* fix: lints for prime
* temp: Add example of how we can think about async sorters
* feat: Allow picker to decide when to cancel
* fix: simplify scoring logic and tests
* fixup: name
* fix: Move back towards more backwards compat methods
* fixup: Remove results from opts
* fixup: remove trailing quote
* fixup: Attempt to clean up some more async items. Next is status
* wip: Add todo for when bfredl implements extmarks over the EOL
* wip
* fixup: got em
* fixup: cleaning
* fixup: docs
* feat: Add vim docs & generators
* example of what we could start to do
* Docgen CI job
* wip
* incremental updates. soon good validation
* [Actions] Generate Documentation
skip-checks: true
* pretty cool now
* [Actions] Generate Documentation
skip-checks: true
* make sure telescope is loaded first
* Add updates. Maybe this will not delete now?
* Add defaults tags as well
* 😄
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Co-authored-by: Github Actions <actions@github>
Big shoutout to @rockerBOO for the idea and basically all the impl!
* feat: Add dropdown layout strategy
* Adding more docs. Working better with options
* Refactor borders
* Fix for spaces
* Add preview to layout. Add Themes.
* feat: themes
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>