Commit a5dc20b
grep: show non-empty lines before functions with -W
Non-empty lines before a function definition are most likely comments
for that function and thus relevant. Include them in function context.
Such a non-empty line might also belong to the preceding function if
there is no separating blank line. Stop extending the context upwards
also at the next function line to make sure only one extra function body
is shown at most.
Signed-off-by: Rene Scharfe <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 6653a01 commit a5dc20b
2 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
1479 | 1481 | | |
1480 | 1482 | | |
1481 | 1483 | | |
1482 | 1484 | | |
1483 | | - | |
| 1485 | + | |
1484 | 1486 | | |
1485 | 1487 | | |
1486 | 1488 | | |
1487 | 1489 | | |
1488 | 1490 | | |
1489 | 1491 | | |
1490 | | - | |
1491 | | - | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
1492 | 1497 | | |
1493 | 1498 | | |
1494 | 1499 | | |
1495 | 1500 | | |
1496 | 1501 | | |
| 1502 | + | |
1497 | 1503 | | |
1498 | 1504 | | |
1499 | 1505 | | |
1500 | 1506 | | |
1501 | 1507 | | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1502 | 1518 | | |
1503 | 1519 | | |
1504 | 1520 | | |
1505 | | - | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1506 | 1525 | | |
1507 | 1526 | | |
1508 | 1527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
| 788 | + | |
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| |||
0 commit comments