Replies: 3 comments 5 replies
-
|
Am I understanding correctly that this is about working around the current terminal buffer pooling? I would imagine any hacky workaround you can come up with is acceptable, and if anyone complains just explain proper functionality is relies on an upcoming fix/change in a dependency. Alternatively wait before you release multi-session for nvim-dap-view? |
Beta Was this translation helpful? Give feedback.
-
What's the reason that you need to take control of creating the buffers and deleting them? Not entirely opposed to give the option to opt-out of the pooling, but would be interesting to know more about the use-case/requirements |
Beta Was this translation helpful? Give feedback.
-
Weary of answering on @igorlfs's behalf (he knows more about the problem domain at this point), but the gist of it is that UI implementations might want to control how terminal buffers are associated with sessions. For example, you might want to:
You're probably already aware but I outlined the current problems in this comment: igorlfs/nvim-dap-view#51 (comment) nvim-dap-view seems to have a hack (that I haven't looked extensively into (E: seems it just deletes buffers when a session closes, which isn't ideal)) which seems to somewhat alleviate these issues but it has come at a cost of usability, namely that you can't open the console pane until you start a session because nvim-dap-view doesn't know what terminal buffer to show yet, which also makes the UI not show the console pane when opened. Not familiar enough with the current state to say what the best solution is, however the ability to disable the pooling does solve all of these issues, as it completely inverts control of terminal buffer lifetime management to nvim-dap-view. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm finishing the implementation of multi-session support for nvim-dap-view. The last piece of the puzzle is handling terminal buffers in an intuitive manner. Here's my current approach:
Whenever the session changes, I create a new terminal buffer for the new session if the following criteria are met:
I think that's a solid approach. However, when it comes to deleting these buffers, I'm having trouble. To get around the
termbuf_pooling, I thought about deleting the buffers when a session ends. This works perfectly pooling-wise, but it has the huge drawback of... cleaning up the buffer for the current session. That sucks, because users may wanna take a look at that buffer after the session ends.I can see people (rightfully) complaining if I were to push such a change, but I couldn't come up with anything more clever. I would have to keep track of the session states and if a given buffer is visible, so I wouldn't delete it straight away. Also, I'm afraid that if I were checking both of these conditions, my workaround for the
termbuf_poolingwould no longer work.My goal with this discussion is to check if I haven't missed anything to make behavior more intuitive.
cc @miroshQa may also be interested
Beta Was this translation helpful? Give feedback.
All reactions