Commit cb8e161b authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix blame fails when opening a single file

Sometimes if you open a file like `kate file`, the blame fails and we
don't see anything till we force a viewChanged signal.
parent b6818732
......@@ -224,11 +224,16 @@ void KateGitBlamePluginView::viewChanged(KTextEditor::View *view)
void KateGitBlamePluginView::startBlameProcess(const QUrl &url)
{
if (m_blameInfoProc.state() != QProcess::NotRunning) {
// Wait for the previous process to be done...
if (url.isEmpty() || !url.isValid() || m_blameUrl == url) {
return;
}
// Kill any existing process...
if (m_blameInfoProc.state() != QProcess::NotRunning) {
m_blameInfoProc.kill();
m_blameInfoProc.waitForFinished();
}
QString fileName{url.fileName()};
QDir dir{url.toLocalFile()};
dir.cdUp();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment