@@ -96,6 +96,39 @@ def _move_commit(self, method_name):
96
96
97
97
self ._update_mapping (start , finish )
98
98
99
+ def _jump_to_commit (self , sha ):
100
+
101
+ start = self .file_history .current_commit .sha
102
+
103
+ if not self .file_history .jump_to_commit (sha ):
104
+ curses .beep ()
105
+ return
106
+
107
+ finish = sha
108
+
109
+ if start == finish :
110
+ curses .beep ()
111
+ return
112
+
113
+ self ._update_mapping (start , finish )
114
+
115
+ @ModalScrollingInterface .key_bindings ('i' )
116
+ def info (self , times = 1 ):
117
+ with open ('debug.out' , 'a' ) as f :
118
+ f .write ("%s\n " % self .highlight_line )
119
+ blame_line = self .content ()[self .highlight_line ]
120
+ f .write ("--- blame line\n " )
121
+ f .write ("sha %s\n " % blame_line .sha )
122
+ f .write ("line %s\n " % blame_line .line )
123
+ f .write ("current %s\n " % blame_line .current )
124
+ f .write ("original_line %s\n " % blame_line .original_line )
125
+ f .write ("final_line %s\n " % blame_line .final_line )
126
+
127
+ @ModalScrollingInterface .key_bindings ('j' )
128
+ def info (self , times = 1 ):
129
+ blame_line = self .content ()[self .highlight_line ]
130
+ self ._jump_to_commit (blame_line .sha )
131
+
99
132
@ModalScrollingInterface .key_bindings (']' )
100
133
def next_commit (self , times = 1 ):
101
134
for i in range (0 ,times ):
0 commit comments