Skip to content

fix: suspend/restore set paste when loading picker UI#334

Open
anmonteiro wants to merge 1 commit intodmtrKovalenko:mainfrom
anmonteiro:anmonteiro/picker-paste
Open

fix: suspend/restore set paste when loading picker UI#334
anmonteiro wants to merge 1 commit intodmtrKovalenko:mainfrom
anmonteiro:anmonteiro/picker-paste

Conversation

@anmonteiro
Copy link
Copy Markdown
Contributor

@anmonteiro anmonteiro commented Apr 4, 2026

sometimes I'll have set paste on because i'm pasting something from an external clipboard, but it doesn't make sense to have it in the file picker UI.

local preview_config = conf.get().preview
if preview_config then preview.setup(preview_config) end

local function suspend_paste()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to override it in the buffer local options? Doesn’t it work?

Copy link
Copy Markdown
Owner

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it can work as buffer local option set to false

@anmonteiro
Copy link
Copy Markdown
Contributor Author

:set paste is actually a global setting, not per buffer.

@dmtrKovalenko
Copy link
Copy Markdown
Owner

You can override any global setting per buffer using vim.bo, we do that for a bunch of settings

It would be a more neat solution

@anmonteiro
Copy link
Copy Markdown
Contributor Author

wasn't aware, let me try!

@anmonteiro anmonteiro force-pushed the anmonteiro/picker-paste branch from a0ec365 to 154a65a Compare April 4, 2026 17:58
@anmonteiro
Copy link
Copy Markdown
Contributor Author

that doesn't seem to be possibile.

This PR is mostly a nice-to-have, and not strictly needed for me. was just jarring when my vim was in paste mode and navigating in the fff picker didn't work.

@dmtrKovalenko
Copy link
Copy Markdown
Owner

I'll check and if it's not I'll merge it

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 this pull request may close these issues.

2 participants