Commit c2fd4c3
committed
fix(word_diff): "No newline at eof" should show once for single hunk
Problem:
When use `require('gitsigns.diff_int').run_diff` I find
"no_nl_at_eof=true" can be set for both removed/added hunk, this make
"\ No newline at eof" appear multiple times.
Solution:
* Only show no_nl_at_eof when it changed, remove uselss +/- prefix.
* Also insert no_nl_at_eof after insert word diff to hls array
to avoid messup the hls[] array index.1 parent 1ce96a4 commit c2fd4c3
2 files changed
+14
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | 578 | | |
588 | 579 | | |
589 | 580 | | |
| |||
611 | 602 | | |
612 | 603 | | |
613 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
614 | 616 | | |
615 | 617 | | |
616 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | | - | |
| 981 | + | |
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
987 | | - | |
| 986 | + | |
988 | 987 | | |
989 | 988 | | |
990 | 989 | | |
991 | 990 | | |
992 | 991 | | |
993 | 992 | | |
994 | | - | |
| 993 | + | |
995 | 994 | | |
996 | 995 | | |
997 | 996 | | |
| |||
0 commit comments