File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ const cli = require(`commander`)
55
66const { readFileSync } = require ( 'fs' )
77
8-
9-
108async function main ( ) {
119
1210 cli
@@ -17,7 +15,7 @@ async function main() {
1715 console . log ( ` Example:` )
1816 console . log ( `` )
1917 console . log ( ` $ splitdiff file1 file2` )
20- console . log ( ` $ git diff file1 file2 | splitdiff` )
18+ console . log ( ` $ git diff --no-pager file1 file2 | splitdiff` )
2119 console . log ( `` )
2220 } )
2321 . parse ( process . argv )
Original file line number Diff line number Diff line change @@ -29,12 +29,16 @@ class Pair {
2929 this . left . padLines ( - misalignmentDelta )
3030 }
3131 }
32+ padLines ( n ) {
33+ this . left . padLines ( n )
34+ this . right . padLines ( n )
35+ }
3236 drawLines ( ) {
3337 this . left . drawLine ( )
3438 this . right . drawLine ( )
3539 }
3640 combine ( ) {
37- this . drawLines ( )
41+ // this.drawLines()
3842
3943 if ( this . left . sanctioned && this . left . sanctioned . length > 0 && ! this . left . sanctioned [ this . left . lineLength ] ) this . left . ellipses ( )
4044 if ( this . right . sanctioned && this . right . sanctioned . length > 0 && ! this . right . sanctioned [ this . right . lineLength ] ) this . right . ellipses ( )
@@ -255,8 +259,7 @@ module.exports = {
255259 )
256260
257261 pair . drawLines ( )
258- pair . left . currentSourceLine = ''
259- pair . right . currentSourceLine = ''
262+ pair . padLines ( 1 )
260263 output . push ( pair . combine ( ) )
261264
262265 for ( let hunk of patch . hunks ) {
@@ -285,8 +288,7 @@ module.exports = {
285288 pair . align ( )
286289 pair . left . currentSourceLine = line
287290 pair . right . currentSourceLine = line
288- pair . left . drawLine ( )
289- pair . right . drawLine ( )
291+ pair . drawLines ( )
290292 }
291293
292294 if ( symbol === '-' ) {
You can’t perform that action at this time.
0 commit comments