NrrwRgn
NrrwRgn copied to clipboard
Issue: `NrrwRgn` buffers get replaced with the source buffer after closing it
I'm using NrrwRgn latest version, this is what I do:
- I open a buffer.
- I visually select some lines, range A.
- I execute
:NRon the visual selection. - I visually select some lines, range B, not overlapping with A.
- I execute
:NRon the visual selection.
As a result, 3 buffers are open, the source one, and the other two with the two visual selections, A and B.
Problem is that if I close the source buffer, leaving only the two range selection buffers in the tab (A and B), then when focusing buffer of range B, the original source buffer replaces the range A one.
If I reopen the source buffer in the same tab, going back to the three buffers, the issue doesn't occur (range A buffer is not replaced by the source one while focusing buffers).
Is this a bug? I would like to open any number of range selections in new buffers in the same tab, without having to keep the original one also open (active in the tab).
Hm, I think this should work, not hundert percent sure, however. I'll need to check this.
Have you tried to use :hide instead of closing the buffers? How exactly did you close the buffers?
Here is a gif showing the problem:
Towards the end, I close the source buffer, and only the two NrrwRgn buffers are shown. But when I move from the first buffer to the second, then the first buffer is replaced with the source one, which I previously closed with :q.
Using :hide for the source buffer instead of :q, the issue still occurs.
ah, now I understand the problem. Yes that is intentionally, because otherwise the plugin wouldn't know how to write back the content. It should be possible to resize the window so it doesn't take too much space.