| 653 | } |
| 654 | |
| 655 | void GitPlugin::blame( UICodeEditor* editor ) { |
| 656 | if ( !mGitFound ) { |
| 657 | editor->setTooltipText( |
| 658 | i18n( "git_not_found", |
| 659 | "Git binary not found.\nPlease check that git is accessible via PATH" ) ); |
| 660 | return; |
| 661 | } |
| 662 | mThreadPool->run( [this, editor]() { |
| 663 | auto blame = mGit->blame( editor->getDocument().getFilePath(), |
| 664 | editor->getDocument().getSelection().start().line() + 1 ); |
| 665 | editor->runOnMainThread( [this, editor, blame] { |
| 666 | displayTooltip( |
| 667 | editor, blame, |
| 668 | editor->getScreenPosition( editor->getDocument().getSelection().start() ) |
| 669 | .getPosition() ); |
| 670 | } ); |
| 671 | } ); |
| 672 | } |
| 673 | |
| 674 | // Branch operations |
| 675 |
nothing calls this directly
no test coverage detected