telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

Avoid opening in winfixbuf windows

Open sarmong opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. When telescope is opened from a window with winfixbuf, a file cannot be edited in that window.

Describe the solution you'd like Check if a window that the file is going to be open in has winfixbuf then choose another window - previously selected by the user (if possible to determine).

sarmong avatar May 23 '24 20:05 sarmong

Check if a window that the file is going to be open in has winfixbuf then choose another window - previously selected by the user (if possible to determine).

I think this would be kind of complicated. Maybe a compromise would be just open the file in a new split. I think this is the behavior vim uses when trying to open something from a quickfix list but the current buffer has winfixbuf.

jamestrew avatar May 26 '24 03:05 jamestrew

This seems reasonable.

One potential problem though - is there a chance it will mess up window layout? Say you have regular buffer and nvim-tree opened. You open telescope from nvim-tree. Might telescope open split shifting nvim-tree from leftmost (or rightmost) edge to the center?

sarmong avatar May 26 '24 07:05 sarmong