dbgx / lldb.nvim

No longer maintained. Possible alternative: https://github.com/rcarriga/nvim-dap-ui
Other
262 stars 20 forks source link

Log does not scroll to bottom #26

Closed ckwang closed 8 years ago

ckwang commented 8 years ago

First of all, thank you for this awesome plugin!

One inconvenience I noticed is that the log window does not scroll to bottom automatically in all cases. When a new message comes in, the log window scrolls to bottom as expected if the focus is on the log window itself. However, if the focus is on any other window (for example the code window, which gets the focus during most of the workflow), the log window won't scroll to bottom automatically.

Currently I am using NVIM 0.1.4 installed from Homebrew. (I am on MacOSX.)

Thanks again!

ckwang commented 8 years ago

I noticed that: as soon as the log window gains focus, it will scroll to bottom automatically. (Interestingly, this behavior happens regardless of whether there's any new content. I don't know if it's intended.)

Maybe one way to solve this is to give focus to the log window temporarily whenever we log a new content.

critiqjo commented 8 years ago

Interestingly, this behavior happens regardless of whether there's any new content. I don't know if it's intended.

It is intended, to replace the lack of auto-scroll on new content! The reason there is no auto-scroll is that, you have to focus on the log window to scroll down and then focus the previously focused window. I was too lazy to implement this with all the special cases in mind (e.g. the user might have closed the log window, the current tab may not have the log window, etc.). On the other hand, just appending to the log is quite easy using the python API.

Pull requests are welcome! :)