Feature Request: "Expand FILTERED LINES <= lines"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barries
    Visitor
    • Oct 2008
    • 9

    Feature Request: "Expand FILTERED LINES <= lines"

    I'd like to be able to set a Text Compare view setting like "Expand FILTERED LINES <= X lines" value that would cause text comparison views to expand sections of "Y FILTERED LINES" where Y <= X. The default of 0 would preserve today's behavior. The "+" symbol would still be displayed in this case, allowing the user to filter the lines.

    The reason is that changes often touch lines that are just far enough apart that 1 or 2 lines get filtered and I would like to not filter those lines in order to make it obvious that the two sections of changed code are very close together (i.e. without reading the "X FILTERED LINES" message).

    My guess is that I'd set this value to 2 or 3.

    Thanks,

    Barrie
  • Aaron
    Team Scooter
    • Oct 2007
    • 16023

    #2
    Hello,

    You can set the number of context lines in the Tools menu -> Options dialog, in the File Views, Text section. If you then enable Show Context on the toolbar (or View menu), it will show that number of lines on either side of your difference sections (with the option to expand additional lines).
    Aaron P Scooter Software

    Comment

    • barries
      Visitor
      • Oct 2008
      • 9

      #3
      Thanks for the reply. I use context by default and have implemented it myself in the past.

      This feature request is an orthogonal proposal that would combine with context to further improve readability between displayed hunks that are "close enough" in the user's judgement. For example, hiding 1 line doesn't save much screen real estate--the "1 FILTERED LINE" fold marker is about as high as the line that was hidden--and hinders code reading (for me, at least) because then I need to read the "1 FILTERED LINE" to see how big the hidden chunk is and, typically, if it's just a line or three, expand the fold by clicking the plus.

      The fold would still be there, but opened / expanded by default instead of having all folds are currently closed / collapsed by default.

      Anyway, thanks for considering the request. Take care.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16023

        #4
        Thanks for the suggestion. I do see how it is a bit different from our Context support, but hoped our current functionality could meet your needs. I can certainly add your request and documentation to our Customer Wishlist. Thanks for the detailed report and taking the time to write in your suggestion.
        Aaron P Scooter Software

        Comment

        • barries
          Visitor
          • Oct 2008
          • 9

          #5
          This feature in the wild: git-log --inter-hunk-context=&lt;lines&gt;

          I happened to stumble across a git-log option with the same behavior as this feature request:

          Code:
          --inter-hunk-context=<lines>
                     Show the context between diff hunks, up to the specified number of
                     lines, thereby fusing hunks that are close to each other.

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16023

            #6
            Thanks for posting your info back here. I'll add the notes to the wishlist entry, and any other git users will be happy to stumble across this forum post.
            Aaron P Scooter Software

            Comment

            Working...