#1100

Feature: Show hunk context in expandable separators

OpenJwiggiffopened 2mo ago

Prerequisites

Proposal

Provide a way to display the hunk context (function/class names, etc.) in the line-info and line-info-basic separators.

For example, given:

   @@ -70,6 +70,11 @@ def update_profile

The separator could display both 16 unmodified lines and def update_profile and maintain the existing expansion controls.

Currently the built-in modes require choosing between:

  • Expansion controls, but only showing N unmodified lines
  • full metadata but losing expansion controls

Motivation and context

In files with several changes, the current N unmodified lines gives distance but not semantic meaning to where the diff is located. The text following the @@ often identifies the enclosing function or class and gives important context.

Activity

0

No activity yet.