Skip to content

Commit

Permalink
Tortoise blame gets goto current line awareness, menu Branch Alt-shor…
Browse files Browse the repository at this point in the history
…tcut B->N
  • Loading branch information
Vince committed Nov 14, 2020
2 parents f98c79d + 0a42b8e commit 6b88e7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions PluginDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void commandMenuInit()
setCommand( 12, TEXT( "-SEPARATOR-" ), NULL, NULL, false );
setCommand( 13, TEXT( "&Pull" ), pullFile, NULL, false );
setCommand( 14, TEXT( "&Status" ), statusAll, NULL, false );
setCommand( 15, TEXT( "&Branch/Checkout" ), branchFile, NULL, false );
setCommand( 15, TEXT( "Bra&nch/Checkout" ), branchFile, NULL, false );
setCommand( 16, TEXT( "&Commit" ), commitAll, NULL, false );
setCommand( 17, TEXT( "Pus&h" ), pushFile, NULL, false );
setCommand( 18, TEXT( "-SEPARATOR-" ), NULL, NULL, false );
Expand Down Expand Up @@ -551,7 +551,13 @@ void blameFileFiles( std::vector<std::wstring> files = {} )
files.push_back( getCurrentFile() );

if ( g_useTortoise )
ExecTortoiseCommand( TEXT( "blame" ), files, false, true );
{
int pos = (int)::SendMessage( getCurScintilla(), SCI_GETCURRENTPOS, 0, 0 );
int line = (int)::SendMessage( getCurScintilla(), SCI_LINEFROMPOSITION, pos, 0 );
std::wstring blame = TEXT( "blame /line:" );
blame += std::to_wstring( line + 1 );
ExecTortoiseCommand( blame, files, false, true );
}
else
ExecGitCommand( TEXT( "\" blame" ), files, false, true );
}
Expand Down
2 changes: 1 addition & 1 deletion resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define VER_MAJOR 1
#define VER_MINOR 4
#define VER_RELEASE 4
#define VER_BUILD 1
#define VER_BUILD 2
#define VER_STRING STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_RELEASE) "." STR(VER_BUILD)

#define FILE_DESCRIPTION "Notepad++ Plugin for Git SCM."
Expand Down

0 comments on commit 6b88e7a

Please sign in to comment.