-
-
Notifications
You must be signed in to change notification settings - Fork 855
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
fix: (terminal) buffer previewer #1120
fix: (terminal) buffer previewer #1120
Conversation
…pe.nvim into fix/buffer-previewer
I wouldn't touch telescope.nvim/lua/telescope/previewers/term_previewer.lua Lines 297 to 300 in f1a27ba
telescope.nvim/lua/telescope/previewers/buffer_previewer.lua Lines 373 to 378 in f1a27ba
|
otherwise LGTM thanks for picking up my slack :) |
There is a crazy stupid issue with this I've so far just overlooked in my tests (please confirm if you have the time). If we use actual buffers for the preview, the fact that the popup style is This only happens if you select a buffer that was not yet attached to the window the picker was launched from.. Pretty tricky, I haven't yet figured out how to work around this in a non-hacky way. E: is this an upstream issue? |
…pe.nvim into fix/buffer-previewer
Good old weird bugs, i have not missed you |
Actually, it's intended behavior.. Just not really nice one as it's been probably set without floats in mind.
|
Well, that escalated quite a lot. It's done though it's quite complicated for fixing terminal buffer preview... While I cannot think of anything wrong with this right now, I'll test this more tomorrow or next week I suppose. Complexity mostly stems from two things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but its still broken if previewer = false
see one of the old conversations are opened it again.
Thanks :)
Don't merge this yet.. if previewer is false, the window options are not applied 🤦 |
Window options are applied just fine for me and i dont even see why this should be a problem. |
Oh but buffer deletion is broken 😆 |
Yes, you're right. It cannot be an issue because the preview window is never created which could overwrite the buffer-window local options. But in one state (E: yeah it was a faulty state) I saw the options not applied and I cannot reproduce this now 😆 I'm too fried. |
E: sorry for the rodeo, I've grown to despise this PR 😆 |
I've also tested whether |
@Conni2461 could you please give this another whirl? I've asked on nvim gitter about clearing decoration provider and didn't get an answer (don't wanna ping bfredl, but I'm sure the circle of people to answer this definitively is very exclusive right now 😆 ) I opened the buffer previewer 30 times in a session and virtually nothing happened in htop. I've minimized callbacks from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good. Thanks :)
And i also think this might fix #1145 which happens since today but not with this PR, no idea why or how this PR should affect this
Just ignore my comments about 1145. You can merge this if its done |
* Reverts #1120 many issues arise (mru, highlighting, settings inheritance, ...) when previewing actual buffers
* Reverts nvim-telescope#1120 many issues arise (mru, highlighting, settings inheritance, ...) when previewing actual buffers
Would close #714 by introducing a new previewer that reuses existing buffers.
@Conni2461 Idk, personally a bit torn on this. While
previewers.new_buffer_previewer
feels backward forbuiltin.buffers
that we already have, though now ofc the buffer foractions.delete
has to be replaced prior to deletion and the solution generally feels bloat. I'm not sure there are other side effects (that's why I abstained touchingnew_buffer_previewer
, as we'd have conflicting logic ala creating buffers vs using existing ones).I'm personally fine with terminal buffers not being highlighted ;)