Skip to content

Commit 0ff5c4e

Browse files
committed
feat(mini.nvim): sync to 3b1b65e
1 parent c2a0707 commit 0ff5c4e

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

mini.nvim/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ There are following change types:
6868

6969
- Allow `source.preview` to directly set another buffer into picker's main window. The recommended way is still to adjust the provided `buf_id` buffer, but there is now a workaround if this is not reasonably possible.
7070

71+
### Refine {#v0.18.0-mini.pick-refine}
72+
73+
- Stop forcing redraw every `config.delay.async` milliseconds while the picker is active. It added visible CPU usage and code/test lines for its benefit (mostly to show "background" changes/notifications).
74+
75+
One side effect of this is that previews with an asynchronous highlighting (like after `vim.treesitter.start()`) might require extra care. There are built-in several (but limited) number of explicit `:redraw` with `config.delay.async` milliseconds apart. If that is not enough, make sure to explicitly redraw when needed.
76+
7177
## mini.surround {#v0.18.0-mini.surround}
7278

7379
### Expand {#v0.18.0-mini.surround-expand}

mini.nvim/doc/mini-pick.qmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ milliseconds of idle time.
326326
control over their side effects. As a result, regular mappings don't work
327327
here and picker's window needs to be current as long as it is shown.
328328
Changing window focus leads to automatic picker stop (after small delay).
329+
Not picker related screen changes require explicit [:redraw](https://neovim.io/doc/user/helptag.html?tag=:redraw).
329330

330331
- Any picker is non-blocking but waits to return the chosen item. Example:
331332
`file = MiniPick.builtin.files()` allows other actions to be executed when
@@ -1086,7 +1087,8 @@ See [MiniPick.ui\_select()](mini-pick.qmd#minipick.ui_select).
10861087
`config.delay` defines plugin delays (in ms). All should be strictly positive.
10871088

10881089
`delay.async` is a delay between forcing asynchronous behavior. This usually
1089-
means making screen redraws and utilizing [MiniPick.poke\_is\_picker\_active()](mini-pick.qmd#minipick.poke_is_picker_active)
1090+
means forcing [:redraw](https://neovim.io/doc/user/helptag.html?tag=:redraw) in preview (several but limited number of times to
1091+
ensure visible async highlighting) and using [MiniPick.poke\_is\_picker\_active()](mini-pick.qmd#minipick.poke_is_picker_active)
10901092
(for example, to stop current matching if query has updated).
10911093
Smaller values give smoother user experience at the cost of more computations.
10921094

0 commit comments

Comments
 (0)