Activate Compile PDF tab on compile begin, switch back to Console on successful compile.
This has always been the case on the main Console pane title bar; this commit brings the same behavior to the tab-mode Console toolbar button.
Except in the case of errors
This was due to the calculation of which log line we're on, happening only after the tex log lines were unwrapped. Fixed this by keeping track of what lines we had unwrapped so we can work backwards to find the original line number.
…ter the active tab is closed