Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug(popup): creating a popup fails after set nomodifiable #570

Closed
aarondill opened this issue Apr 14, 2024 · 1 comment · Fixed by #571
Closed

Bug(popup): creating a popup fails after set nomodifiable #570

aarondill opened this issue Apr 14, 2024 · 1 comment · Fixed by #571

Comments

@aarondill
Copy link

aarondill commented Apr 14, 2024

the modifiable option is inherited by new buffers, so if a buffer is set nomodifiable, then creating a new popup fails while trying to set the popup contents.

I would suggest that plenary should set the newly created popup buffer as modifiable before trying to set the contents.

repro:

vim.o.modifiable = false -- remove this line and it will work.
require("plenary.popup").create("A popup", {})
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 15, 2024
@AlejandroSuero
Copy link
Contributor

I made the changes in #571 to fix this issue.

Conni2461 pushed a commit that referenced this issue Apr 22, 2024
* fix(popup): nomodifiable popup, closes #570

* feat: added test for `set nomodifiable`
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 22, 2024
feat: added test for `set nomodifiable`

fix(popup): set modifiable regardless

fix(popup): set modifiable globally

fix(popup): set modifiable first

fix(popup): added modifiable is false check
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 22, 2024
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 22, 2024
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 25, 2024
feat: added test for `set nomodifiable`

fix(popup): set modifiable regardless

fix(popup): set modifiable globally

fix(popup): set modifiable first

fix(popup): added modifiable is false check
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 25, 2024
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 25, 2024
nvim-lua#571)

* fix(popup): nomodifiable popup, closes nvim-lua#570

* feat: added test for `set nomodifiable`
AlejandroSuero added a commit to AlejandroSuero/plenary.nvim that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants