Leveraging the hyperlinks to specific lines from the log pane, here's a
minimal @button script to jump the the changed parts of the current
file, changed in the sense of git diff blocks.

https://github.com/leo-editor/snippets/blob/master/buttons/changes.py

It doesn't show you what the diff is, just takes you to the middle of
the modified code.  That in itself is useful when you're picking
something up again after a break, or the changes are in nodes with
large body texts.  For changes in nodes with small body texts you might
alternatively track them with bookmarks or (shudder ;-) clones.

It inserts text (hyperlinks) into the log like:

u:\repo\nnm2\src\nnm2.py
 27 lines @ 564
 21 lines @ 849
  7 lines @ 1317
 13 lines @ 1389

click on the line to go to that place in the file.

 - it only diffs the file you're "in" (containing the current node), it
   could diff everything in the repo. and list multiple files, but this
   seems more convenient
 - I've so far failed to style the hyperlinks to use something other
   than ugly underlining to indicate the link, separate problem
 - the hyperlink implementation could be expanded to support (a) more
   than one link per line and (b) an extra protocol to support user
   supplied callbacks so the above could become

   13 lines @ 1389 (diff)

   where '1389' would be the link to the line, and 'diff' would be a
   link to a callback that displays the actual diff.

So, useful, I think, as is - could be expanded.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to