# HG changeset patch # User Kostia Balytskyi # Date 1495238494 25200 # Node ID a438f5a3bc092f54e14f45e2115a36312c2ed302 # Parent 864fc285d10a23855f595b502a651534fa674a84 contrib: make editmergeps able to work with notepad++ Notepad++ has a different FIRSTLINE argument, so needs special handling. diff -r 864fc285d10a -r a438f5a3bc09 contrib/editmergeps.ps1 --- a/contrib/editmergeps.ps1 Fri May 19 17:00:55 2017 -0700 +++ b/contrib/editmergeps.ps1 Fri May 19 17:01:34 2017 -0700 @@ -35,7 +35,8 @@ exit 1 } -if (($ed -eq "vim") -or ($ed -eq "emacs") -or ($ed -eq "nano")) +if (($ed -eq "vim") -or ($ed -eq "emacs") -or ` + ($ed -eq "nano") -or ($ed -eq "notepad++")) { $lines = Get-Lines $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil } @@ -46,6 +47,15 @@ # or the user stops editing the file while (($firstline -ne $nil) -and ($firstline -ne $previousline)) { + if ($ed -eq "notepad++") + { + $linearg = "-n$firstline" + } + else + { + $linearg = "+$firstline" + } + Start-Process -Wait $ed $linearg,$file $previousline = $firstline $lines = Get-Lines