Commit graph

1360 commits

Author SHA1 Message Date
Tod Morrison
441bdcd210
fix(image): correct off by one issue in render fallback (#1560)
Fix off-by-one issue in render_fallback when a tabline is shown (e.g.
with plugins like bufferline.nvim).

## Description

When a tabline is used/shown, the positioning in render_fallback is off
by one. This change checks whether a tabline would be shown and uses the
correct math for that case and, otherwise, works as before.

## Related Issue(s)

  - Fixes #1557
2025-10-20 14:59:33 +02:00
Jason Cheatham
231ffae08d
feat(debug): allow debug evaluation of block selections (#1331)
## Description

This PR adds basic support for visual block selections to
`Snacks.debug.run()`. This is useful when code doesn't start at the
beginning of a line, such as in comment blocks.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
<img width="271" alt="Screenshot 2025-02-19 at 23 02 35"
src="https://github.com/user-attachments/assets/5a440b32-6846-4345-b105-42e64796ac65"
/>
2025-10-20 14:53:55 +02:00
Folke Lemaitre
fe88a07d53
feat(dashboard): optional filter for projects. Closes #798 2025-10-20 14:48:06 +02:00
Folke Lemaitre
021e04fa6f
fix(picker): use nvim_paste instead of nvim_put. Closes #1941 2025-10-20 14:28:20 +02:00
Folke Lemaitre
5cda9532ca
fix(picker): allow some sources to use the current window as main. Closes #2012. See #1941 2025-10-20 14:28:20 +02:00
Franck Delage
e9228d6b2f
fix(dashboard): replace deprecated AutoSession command (#2288)
## Description

The command `SessionRestore` from the auto-session plugin is deprecated.
Replaced it with `AutoSession restore`.
2025-10-20 13:24:04 +02:00
Eric Wong
ca0858a30a
fix(picker.marks): fix buffer checking (#2287)
This buffer number index is 1.
2025-10-20 06:37:28 +02:00
Folke Lemaitre
fcd309f9ea
fix(dashboard): oldfiles filter should return a boolean instead of the result of find. Fixes #2283 2025-10-19 23:01:57 +02:00
Copilot
1ed737e465
fix(dashboard): recent_files section not displaying files without cwd parameter (#2284)
## Problem

The `recent_files` section in the dashboard was not displaying any files
when called without a `cwd` parameter, which is the default usage in
most dashboard examples and documentation.

```lua
-- This would show an empty section after the bug was introduced
{ section = "recent_files", limit = 8 }
```

## Root Cause

When `opts.cwd` was not provided, the code set `root = ""` (empty
string) and passed it to the oldfiles filter:

```lua
local root = opts.cwd and svim.fs.normalize(...) or ""
for file in M.oldfiles({ filter = { [root] = true } }) do
```

The filter logic in `M.oldfiles` checks if a file path starts with the
filter path **AND** if the character immediately after that prefix is a
directory separator (`/` or `\`). With an empty string as the filter
path:

1. `file:sub(1, 0) == ""` is always `true`
2. But `file:sub(1, 1):find("[/\\]")` is `false` for most files (unless
they start with `/` or `\`)
3. This results in `matches = false`, causing all files to be filtered
out

## Solution

Changed the logic to use `nil` instead of an empty string when no `cwd`
is specified:

```lua
local root = opts.cwd and svim.fs.normalize(opts.cwd == true and vim.fn.getcwd() or opts.cwd) or nil
-- Only filter by directory when root is specified. If nil, M.oldfiles will use default filters only (excludes stdpath data/cache/state).
local oldfiles_opts = root and { filter = { [root] = true } } or nil
local ret = {} ---@type snacks.dashboard.Section
for file in M.oldfiles(oldfiles_opts) do
```

When no filter is passed, `M.oldfiles()` uses only its default filters
(excluding stdpath data/cache/state directories), which is the intended
behavior for showing all recent files.

## Testing

All usage scenarios now work correctly:

| Scenario | Code | Behavior |
|----------|------|----------|
| No cwd | `{ section = "recent_files" }` |  Shows all recent files
(except stdpath) |
| Current dir | `{ section = "recent_files", cwd = true }` |  Shows
files in cwd |
| Specific dir | `{ section = "recent_files", cwd = "/path" }` |  Shows
files in specified path |

## Impact

This is a minimal, surgical fix (4 lines changed) that restores the
expected behavior documented in all dashboard examples without affecting
any other functionality.

Fixes the issue where users reported empty recent_files sections after
updating to the latest version.

<!-- START COPILOT CODING AGENT SUFFIX -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>bug: dashboard does not display "recent_files"
section</issue_title>
> <issue_description>### Did you check docs and existing issues?
> 
> - [x] I have read all the snacks.nvim docs
> - [x] I have updated the plugin to the latest version before
submitting this issue
> - [x] I have searched the existing issues of snacks.nvim
> - [x] I have searched the existing issues of plugins related to this
issue
> 
> ### Neovim version (nvim -v)
> 
> 0.11 
> 
> ### Operating system/version
> 
> arch linux
> 
> ### Describe the bug
> 
> after updating, snacks.dashboard stopped displaying the "recent_files"
section.
> Looking through the commit history, I found that commit `5c4365e` is
relevant to that section. Upon rolling the plugin back to one commit
prior to it (commit `a4de830`), the section displayed as normal.
> 
> ### Steps To Reproduce
> 
> update to latest commit
> 
> ### Expected Behavior
> 
> section "recent files" displayed as per the documentations
> 
> ### Repro
> 
> ```lua
> vim.env.LAZY_STDPATH = ".repro"
> load(vim.fn.system("curl -s
https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
> 
> require("lazy.minit").repro({
>   spec = {
>     { "folke/snacks.nvim", opts = {} },
>     -- add any other plugins here
>   },
> })
> ```</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>

Fixes folke/snacks.nvim#2283

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start
the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: folke <292349+folke@users.noreply.github.com>
2025-10-19 22:17:03 +02:00
Folke Lemaitre
d6e34b158d
fix(explorer.watch): handle systems where fs_event doesn't return file names. Closes #2190. Closes #2032
Some checks are pending
CI / ci (push) Waiting to run
2025-10-19 12:13:21 +02:00
Jay Z
ef59af0ffc
fix(image): hover close in insert mode (#2215)
## Description

I'm not 100% sure if this is a bug or if it was intentional, but the
`return` seems to have been lost from a previous refactor
e35d6cd4 (diff-ff9a4f8a621887c466394f755193cc78a5e69e0e2e86f4e668662e1434d3611eL878).

When an image displays using float or hover, the image can block the
text even in insert mode. This makes editing really hard. Adding the
`return` can close the hover in insert mode.

## Related Issue(s)

I couldn't find an issue created for this, but there is a discussion
about it https://github.com/folke/snacks.nvim/discussions/1777.

## Screenshots

Before the fix, the image shows in insert mode.
<img width="704" height="710" alt="image"
src="https://github.com/user-attachments/assets/224883d1-edbc-4f7a-8c1b-91ef00dbe21e"
/>

After the fix, the image stops showing in insert mode.
<img width="389" height="127" alt="image"
src="https://github.com/user-attachments/assets/d704d4f8-9259-4e5e-b7a9-954ea6e2a788"
/>
2025-10-19 12:04:44 +02:00
Folke Lemaitre
65a5c8b3d0
fix(picker.grep): faulty rg cmd. Closes #2280 2025-10-19 11:30:35 +02:00
Folke Lemaitre
5c4365e993
fix(dashboard): recent cwd filter matching 2025-10-19 11:27:52 +02:00
Masayuki Izumi
057d4ab80e
fix(dashboard): fix path filtering for recent_files with cwd option (#2201)
## Description

Fix incorrect path filtering when using `recent_files` section with
`cwd`
option in dashboard.

Previously, when setting cwd to `/foo/bar/baz`, files from directories
with
the same prefix like `/foo/bar/bazbaz` were incorrectly included in the
recent
files list. This was due to simple string prefix matching without
considering
 directory boundaries.

The fix ensures proper directory boundary checking by verifying that the
path
either exactly matches the filter path or is followed by a "/"
character.

## Screenshots

```lua
return {
  "snacks.nvim",
  ---@type snacks.Config
  opts = {
    dashboard = {
      enabled = true,
      sections = {
        {
          title = "Recent Files " .. vim.uv.cwd(),
          section = "recent_files",
          cwd = true,
        },
      },
    },
  },
}
```

### before
<img width="659" height="149" alt="CleanShot 2025-09-24 at 00 00 13"
src="https://github.com/user-attachments/assets/943ad53f-11c5-49d2-b680-f032ad5fee94"
/>

### after
<img width="639" height="111" alt="CleanShot 2025-09-24 at 00 01 01"
src="https://github.com/user-attachments/assets/0dbde991-5164-4afa-9981-ae6707a8fcc0"
/>
2025-10-19 11:11:38 +02:00
Cameron Ring
6daef528c1
fix(notifier): include icon in padding in minimal style (#2239)
## Description

This prevents the text from running underneath the icon when the text is
a single line and the text plus padding is less than max_width.

It does not handle the case where the text is longer than max_width
(with or without wrap).

## Related Issue(s)

Fixes #2238 

## Screenshots

Before:

<img width="494" height="106" alt="Screenshot 2025-10-03 at 13 52 39"
src="https://github.com/user-attachments/assets/fde31ed5-e2ac-4ad3-8ac3-8f74f84456a7"
/>


After:

<img width="518" height="111" alt="Screenshot 2025-10-03 at 13 53 33"
src="https://github.com/user-attachments/assets/0eb72818-d151-40b9-9a0c-dd4d850abba4"
/>
2025-10-19 11:09:19 +02:00
Folke Lemaitre
24e92e0c94
fix(dashboard): use fqn for icon. Closes #1496 2025-10-19 11:07:53 +02:00
Frank Blendinger
98345c7012
fix(scratch): branch fallback for detached head (#1519)
## Description

I work a lot with detached `HEAD` in Git repos and noticed that the
scratch files for those were missing in `Snacks.scratch.select()`.

When working with a detached head, the `git branch --show-current`
returns an empty string, so ret will be `nil` in this case. This breaks
the scratch filename generation. The `table.concat` skips the `nil`
value, so the generated filename is missing one `|` separator. This will
later break in `M.list()`: `file_decode` and `match` will confuse
`branch` and `ft`, and the entry is not added to the items list.

A simple fix for this is to fallback to an empty string for the branch
name.

## Related Issue(s)

I didn't create an issue but fixed the problem right away. Hope this is
fine.

## Screenshots

I can provide one if requested.
2025-10-19 11:05:37 +02:00
Jozsef Lazar
3e9e2e2d71
feat(picker.projects): make max_depth customizable (#2253)
## Description

By making the `max_depth` customizable, I could provide a single entry
dir to the projects picker to discover all my repos 🤞
2025-10-19 11:00:37 +02:00
Folke Lemaitre
d05071255c
fix(picker.preview): directory preview should use cwd. Closes #2212. Fixes #2093 2025-10-19 10:58:26 +02:00
Folke Lemaitre
13f3006dbf
fix(terminal): make sure terminals opend with open() can be found with list(). Closes #2172. Closes #2173 2025-10-19 10:52:54 +02:00
yilisharcs
3d4dd13d2e
feat(bigfile): disable mini-hipatterns (#2170)
## Description

The `mini.hipatterns` plugin causes slowdowns on big files. It's a great
candidate for disabling along with `mini.animate`.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-19 10:40:36 +02:00
Folke Lemaitre
1fee799ad6
fix(picker.grep): better line/col parsing. Closes #2126. Fixes #2123 2025-10-19 10:40:08 +02:00
Andreas Schneider
4bb0dae95d
feat(picker): also ignore dot bare git files (#2058)
## Description

If you clone with --bare then you have a `.bare` and not a `.git`
directory.
2025-10-19 10:35:11 +02:00
Folke Lemaitre
29682a0a72
fix(dashboard): update cursor on loading the dashboard. Closes #2004 2025-10-19 10:31:46 +02:00
Anthony
b4944ff320
fix(bigfile): bigfile doesn't work on windows. (#1969)
## Description

`bigfile` checks whether the path and the buffer name are identical in
filetype detection, but on windows, the path separator might be
different. The buffer name should be normalized here.

## Related Issue

Fixes #1722
2025-10-19 10:27:16 +02:00
SheffeyG
ba7bbcd0df
fix(terminal): check win valid before creating a new terminal (#1927)
## Description

Checking the win vaild also before creating a new terminal

## Related Issue(s)

  - Fixes #1926

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-10-19 10:25:34 +02:00
FineFindus
b35605cc25
style(indent): fix typo overlapppingoverlapping (#1916)
## Description
While debugging https://github.com/folke/snacks.nvim/issues/1808, I
noticed a typo.
2025-10-19 10:20:11 +02:00
Peter Cardenas
cb6bf052da
fix(image): do not save remote image if fetch fails (#1915)
## Description

If fetching an image fails, when the buffer with the image is opened
again, the error message shown is for the `identify` command rather than
the `url` command. This is because the output of the `wget` or `curl`
command is saved to the file even if the fetching fails. Thus, when we
try to resolve it again, we think it's cached and read the file on the
`identify` step only to fail.

## Related Issue(s)

did not find any
2025-10-19 10:19:56 +02:00
Dmitriy Kovalenko
fc06234ce1
feat(picker): Support rmagatti/autosession session manager (#1825)
## Description

Supports this plugin for session restorations
https://github.com/rmagatti/auto-session

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-19 10:19:33 +02:00
François-Pierre Bouchard
83f364f833
fix(dashboard): set border = "none" on terminal sections (#1643)
## Description

Since 0.11, a new `vim.o.winborder` global option sets the borders for
all floating windows. Override this for terminal sections.
2025-10-19 10:16:50 +02:00
phanium
758e64c18f
fix(image): set winblend=0 for floatwin when use unicode placeholders (#1615)
When `winblend > 1`
(8de1dc6923/src/nvim/highlight.c (L751)),
hover image is not shown (in kitty).

Reproduce: `nvim +'set winblend=10' docs/image.md +2`

I have a `vim.o.winblend = 20` in global config before floatwin created.
That's why I notice it.

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-10-19 10:14:25 +02:00
EasonMo
4379085616
fix(scratch): hide buffer after formatting when close (#1523)
## Description

When you format code in scratch, the scratch buffer will be opened in
bufferline. The buffer will not disappear even after the scratch window
is closed.

## Related Issue(s)

## Screenshots


![image](https://github.com/user-attachments/assets/463289c8-9a40-4a2f-ae13-65f2d142343c)

![image](https://github.com/user-attachments/assets/e9d058c6-dc9a-43d2-866b-26a33c272a96)

![image](https://github.com/user-attachments/assets/f8f46c66-a3f6-4d49-8442-7544ad2d0d02)
2025-10-19 10:13:03 +02:00
Wen
ba90011a14
fix(scratch): use icon[1] when icon is a table to avoid table.concat error (#2242)
## Description

Problem: opts.icon can be a table {icon, icon_hl} but the code inserts
opts.icon directly into filekey and later does table.concat(filekey,
"|"). That crashes when an element is a table.

Fix: use the first element of opts.icon when opts.icon is a table
(fallback to opts.icon or "").

## Related Issue(s)

N/A

## Screenshots

This happens when scratch.opts.icon is a table per documentation
<img width="1453" height="159" alt="image"
src="https://github.com/user-attachments/assets/c22cf58e-517d-400d-87d4-d05830df530d"
/>
2025-10-19 10:03:43 +02:00
Folke Lemaitre
835c4cbfc6
fix(explorer.git): don't propagate deletes to parent dirs that don't exist 2025-10-19 08:57:14 +02:00
Daniel Danner
e441c641eb
perf(git): invoke git status with --no-optional-locks (#2175)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
According to the Git docs, `git status` automatically refreshes the
index, meaning it recreates the `.git/index` file. In `watch.lua`, we
specifically watch for modifications of that file and (indirectly?) run
`git status` everytime it changes. This effectively forms an infinite
loop of refreshes whenever the explorer is open.

Passing `--no-optional-locks` to `git status` breaks this loop because
it stops it from refreshing the index. Doing this also happens to be the
official recommendation for scripts doing `git status` in the
background: https://git-scm.com/docs/git-status#_background_refresh

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-19 08:41:34 +02:00
Kim A. Ødegaard
02bf7d2205
fix(indent): nil check before setting extmark (#1635)
## Description

Resolves the following error, which occurs when removing a visual line
selection in a TypeScript file when `indent.scope.underline` is `true`:

```
  Error  Error in decoration provider snacks_indent.win:
Error executing lua: ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:317: attempt to get length of local 'scope_from' (a nil value)
stack traceback:
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:317: in function 'render_scope'
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:285: in function 'on_win'
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:496: in function <....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:494>
  [builtin#36]: at 0x7f91509530e0
  ...ghtly/share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:307: in function 'handler'
  ...rapped-nightly/share/nvim/runtime/lua/vim/lsp/client.lua:679: in function ''
  vim/_editor.lua: in function <vim/_editor.lua:0>
Error in decoration provider snacks_indent.win:
Error executing lua: ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:317: attempt to get length of local 'scope_from' (a nil value)
stack traceback:
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:317: in function 'render_scope'
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:285: in function 'on_win'
  ....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:496: in function <....local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua:494>
  [C]: in function 'nvim_command'
  ....local/share/nvim/lazy/nui.nvim/lua/nui/popup/border.lua:624: in function '_relayout'
  ...m/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:390: in function 'update_layout'
  ....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:246: in function <....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:245>
  [C]: in function 'pcall'
  ....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:143: in function 'reset'
  ...local/share/nv
```

## Steps to reproduce

Edit a TypeScript file with the following contents:

```typescript
//

const test = {
};
````

Remove the file contents with `ggVGd` to trigger the error.
2025-10-19 07:43:55 +02:00
Iordanis Petkakis
da655a3538
fix(lazygit): allow extensible user args (#789)
## Description
Currently `opts.args` are set to a specific value. Allow users to
optionally pass their own additional args.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-19 07:42:25 +02:00
Iordanis Petkakis
bebf0bd38e
fix(scope): allow user to disable keys (#1918)
## Description
Currently the user is not able to disable the existing keys in
`keys.textobject`, because if he sets for example `ii = false`, it
throws an error about not being able to index `opts`.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None, rather a LazyVim discussion
https://github.com/LazyVim/LazyVim/discussions/6118
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-10-19 07:40:07 +02:00
Iordanis Petkakis
b9bd8ae982
fix(picker.actions): take into account if source is recent explicitly (#1920)
## Description
I noticed in the project picker that when pressing `<c-r>` to show
recent files it showed recent files from everywhere instead of only the
item's directory. When the source is `recent` we have to pass
`filter.cwd = ...` so that it correctly filters out recent items.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-10-19 07:38:06 +02:00
Iordanis Petkakis
457596be6d
fix(projects): normalize item.text for correct Windows support (#2275)
## Description
`Snacks.picker.projects` would not show correctly projects on Windows.
`item.text` was something like
`C:\Users\my_user\AppData\Local\nvim-data\lazy\LazyVim\.git\`.

By normalizing `item.text` it shows correctly the projects.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-17 21:16:24 +02:00
Iordanis Petkakis
39b14c4006
feat(terminal): minor improvements for user experience (#2276)
## Description
I was trying to create a simple `select` picker to choose terminals to
open.

With the current implementation only the fields `cmd` and `id` are
exposed. `cwd` and `env` are not which are used to get the terminal id
as well.

`M.list()` uses `vim.tbl_filter` which turns `terminals` into a list
removing the keys terminal ids. Even if that was not the case (i.e using
a normal `for` loop to add to `terminals`) the keys would be a string
due to `vim.inspect` and one would have to use patterns to extract
information from them.

It's easier to just add `cwd` and `env` to `vim.b[buf].snacks_terminal`
to have that information available and be easier for users to manipulate
which terminal they want to choose and open.

Also added `opts.count` as an option to be able to programmatically
choose the terminal with exactly the same options when it was created,
so one can just do
```lua
local term = vim.b[buf].snacks_terminal
Snacks.terminal(term.cmd, { cwd = term.cwd, env = term.env, count = term.id })
```
to programmatically invoke a certain terminal.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Solves my issue and #2271 as well.
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-10-17 21:14:56 +02:00
Folke Lemaitre
4edf207bfe
fix(picker.actions): multi-action descriptions. Fixes #1501 2025-10-17 21:13:56 +02:00
Folke Lemaitre
b064be2882
fix(picker): load correct actions in list of action names. Closes #1501 2025-10-17 21:13:56 +02:00
Liu Zehao
943a3c7d4a
fix(dim): fixed the issue of dim's scope variable being nil and outputting… (#1938)
## Description

During my use of dim, I found that an empty document can cause Snacks to
output error messages, resulting in an instant freeze when opening an
empty file

## Related Issue(s)

- Fixes #1810 

## Screenshots
before change

![before-fix-dim](https://github.com/user-attachments/assets/203791d7-629a-4650-9c87-a04fb81bad3d)


after change

![after-fix-dim](https://github.com/user-attachments/assets/44097f7d-2229-4407-8868-388e758774b5)
2025-10-14 18:29:08 +02:00
Folke Lemaitre
914c9004be
fix(bufdelete): try alternate buffer first and otherwise last used buffer 2025-10-13 20:12:34 +02:00
S1M0N38
125978b57a
fix(picker): add type field to qflist item (#1538) (#1539)
Fix for #1538

## Screenshots

**Old**

<img width="1232" alt="Screenshot 2025-03-09 at 10 40 24"
src="https://github.com/user-attachments/assets/e8b9d122-0f75-4c04-9ee8-509314232e36"
/>

---

**After fix**
<img width="1259" alt="Screenshot 2025-03-09 at 10 40 58"
src="https://github.com/user-attachments/assets/2048d0c6-56c8-4359-927e-444c2b190671"
/>
2025-10-12 21:55:43 +02:00
Folke Lemaitre
71d6d3cad4
fix(layout): allocate at least 1 cell for a widget and enlarge/shrink the root box when needed. Closes #2261 2025-10-12 12:14:13 +02:00
Folke Lemaitre
5c63614880
feat(picker.select): select now fits the list to the items independent of the layout. Closes #2035 2025-10-11 11:09:40 +02:00
Folke Lemaitre
722f9eac7c
feat(picker.layout): added config hook for resolved layouts. See #2035 2025-10-11 11:09:40 +02:00
Folke Lemaitre
ba7845bb85
feat(layout): static (non-flex) layouts now shrink the root box to fit the contents. See #2035 2025-10-11 11:09:40 +02:00