oop
parent
72fee73a00
commit
36c5228a6c
|
|
@ -53,10 +53,15 @@ func _edit(filepaths func() []string) error {
|
|||
for _, editedFile := range editedFiles {
|
||||
edits[path.Base(editedFile)] = editedFile
|
||||
originalFile := func() string {
|
||||
last := ""
|
||||
for _, f := range filepaths() {
|
||||
if path.Base(f) == path.Base(editedFile) {
|
||||
return f
|
||||
}
|
||||
last = f
|
||||
}
|
||||
if last != "" {
|
||||
return path.Join(path.Dir(last), path.Base(editedFile))
|
||||
}
|
||||
panic("how?")
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in New Issue