Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

annotate: select (text cursor) annotated line target, more intelligent scroll

Right click on a line, pick 'annotate originating revision', it annotates the originating
file at that revision, highlights the line that was clicked on, then tries half-heartedly to
center the line in the viewport (could have better logic there).

Changeset 39c9013ca46e

Parent 0d4c2388d0cb

by Steve Borho

Changes to one file · Browse files at 39c9013ca46e Showing diff from parent 0d4c2388d0cb Diff from another changeset...

 
153
154
155
156
 
 
157
158
159
160
 
 
161
 
 
 
162
 
 
163
164
165
 
215
216
217
218
219
220
221
 
153
154
155
 
156
157
158
159
160
 
161
162
163
164
165
166
167
168
169
170
171
172
 
222
223
224
 
225
226
227
@@ -153,13 +153,20 @@
  self.loadComplete.emit()   if hasattr(self.thread, 'data'):   self.fillModel(self.thread.data) - if self.resumeline and len(self.edit.revs) > self.resumeline: + lines = len(self.edit.revs) * 1.0 + if self.resumeline and lines > self.resumeline:   cursor = self.edit.textCursor()   cursor.movePosition(QTextCursor.NextBlock,   QTextCursor.MoveAnchor, - self.resumeline) + self.resumeline-1) + cursor.select(QTextCursor.LineUnderCursor)   self.edit.setTextCursor(cursor) + sb = self.edit.verticalScrollBar() + val = int(sb.maximum() * self.resumeline / lines) + sb.setValue(val)   self.edit.ensureCursorVisible() + else: + self.edit.verticalScrollBar().setValue(0)   self.thread = None     def keyPressEvent(self, event): @@ -215,7 +222,6 @@
  self.colorsels = sels     self.edit.setExtraSelections(self.colorsels) - self.edit.verticalScrollBar().setValue(0)     def nextMatch(self):   if not self.matches: