Commit graph

18 commits

Author SHA1 Message Date
Andrei Heidelbacher
041bf1da9e
fix(zen): always count cmdheight towards Zen bottom offset (#1402)
## Description

Zen window height should always account for `cmdheight` (not only if
`statusline` is enabled) and be computed dynamically when `cmdheight >
0` to avoid the `cmdline` obstructing the Zen window.

## Related Issue(s)

- Fixes https://github.com/folke/snacks.nvim/issues/1401
- Fixes https://github.com/folke/snacks.nvim/issues/1375

## Screenshots

Before:
![zen-mode-cmdline](https://github.com/user-attachments/assets/c03be4af-2368-4b04-8065-49ced875aa2d)

After:
![zen-mode-fixed-cmdline](https://github.com/user-attachments/assets/14dc72bb-7431-4d05-b0fd-b6a2367bdc6d)
2025-02-24 07:19:28 +01:00
Folke Lemaitre
3100333fdb
fix(zen): properly get zoom options. Closes #1207 2025-02-16 08:29:43 +01:00
Folke Lemaitre
b1db65ac61
fix(picker): consider zen windows as main. Closes #973 2025-02-07 06:38:38 +01:00
Folke Lemaitre
f31467637a
fix(zen): parent buf. Fixes #720 2025-01-23 17:06:52 +01:00
Folke Lemaitre
920a9d28f1
fix(zen): properly handle close 2025-01-20 12:08:52 +01:00
iniw
ba45c280dd
fix(zen): sync cursor with parent window (#547)
## Description

The cursor position is now synchronized between the zen/zoom window and
it's parent.

I'm not sure if this is the best way to achieve that. Initally I wanted
to do set the parent's cursor position only when the zen buffer is
closed, but I couldn't figure out a way to do that.

## Related Issue(s)

Fixes #539
2025-01-20 11:49:34 +01:00
Folke Lemaitre
05f49814f3
fix(zen): set zindex to 40, lower than hover (45). Closes #345 2024-12-18 15:35:00 +01:00
Folke Lemaitre
05bb95739a
feat(zen): make zen/zoom mode work for floating windows. Closes #5028 2024-12-13 13:37:39 +01:00
Folke Lemaitre
5851de157a
feat(zen): added on_open / on_close callbacks 2024-12-12 18:32:22 +01:00
Folke Lemaitre
b13eaf6bd9
fix(zen): return after closing. Fixes #259 2024-12-11 22:54:19 +01:00
Jorge Villalobos
9454ba35f8
feat(toggle): add zen mode toggle (#243)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

Adds a `zen` mode toggle.

## 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. -->

![Screenshot 2024-12-10 at 15 19
19](https://github.com/user-attachments/assets/f923f1d2-10f7-440a-9855-0a44e6798269)
![Screenshot 2024-12-10 at 15 19
28](https://github.com/user-attachments/assets/5fb6ca3d-a82d-49e3-92fe-3f7d99d176bb)
![Screenshot 2024-12-10 at 15 20
10](https://github.com/user-attachments/assets/a9560795-51e3-423a-8765-960922855622)
![Screenshot 2024-12-10 at 15 20
17](https://github.com/user-attachments/assets/a6478530-a971-4abe-bb69-3f5cf5d6a579)

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-12-11 11:28:48 +01:00
Folke Lemaitre
b5cb90f91d
feat(zen): zz when entering zen mode 2024-12-10 19:50:58 +01:00
Folke Lemaitre
d93de7af69
fix(zen): when Normal is transparent, show an opaque transparent backdrop. Fixes #235 2024-12-10 19:50:47 +01:00
Folke Lemaitre
140204fde5 build: added metadata to plugins 2024-12-10 13:55:51 +01:00
Folke Lemaitre
14da56ee97 fix(zen): properly close existing zen window on toggle 2024-12-10 13:55:51 +01:00
Folke Lemaitre
8459e2adc0 feat(zen): added zoom indicator 2024-12-10 13:55:51 +01:00
Folke Lemaitre
afb89ea159 feat(zen): added zen plugin 2024-12-10 13:55:51 +01:00
Folke Lemaitre
c509ea52b7 feat(snacks): zen mode 2024-12-10 13:55:51 +01:00