##// END OF EJS Templates
contrib: make editmergeps able to work with notepad++...
Kostia Balytskyi -
r32345:a438f5a3 default
parent child Browse files
Show More
@@ -35,7 +35,8 b' if ($ed -eq $nil)'
35 exit 1
35 exit 1
36 }
36 }
37
37
38 if (($ed -eq "vim") -or ($ed -eq "emacs") -or ($ed -eq "nano"))
38 if (($ed -eq "vim") -or ($ed -eq "emacs") -or `
39 ($ed -eq "nano") -or ($ed -eq "notepad++"))
39 {
40 {
40 $lines = Get-Lines
41 $lines = Get-Lines
41 $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil }
42 $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil }
@@ -46,6 +47,15 b' if (($ed -eq "vim") -or ($ed -eq "emacs"'
46 # or the user stops editing the file
47 # or the user stops editing the file
47 while (($firstline -ne $nil) -and ($firstline -ne $previousline))
48 while (($firstline -ne $nil) -and ($firstline -ne $previousline))
48 {
49 {
50 if ($ed -eq "notepad++")
51 {
52 $linearg = "-n$firstline"
53 }
54 else
55 {
56 $linearg = "+$firstline"
57 }
58
49 Start-Process -Wait $ed $linearg,$file
59 Start-Process -Wait $ed $linearg,$file
50 $previousline = $firstline
60 $previousline = $firstline
51 $lines = Get-Lines
61 $lines = Get-Lines
General Comments 0
You need to be logged in to leave comments. Login now