Do not log when in visual mode, select mode, or while waiting on
completion. This keeps the screen from being cleared or from
generating an exception when logging would otherwise change to the log
window to scroll.
Do not change to the log window merely to write to it. The only
operation that is now required to change to the log window is to
scroll it, so limit the time that it's the active window to that
single operation.
lsp: log more efficiently