AutoSaveFilename returns the autosave filename.
()
| 564 | |
| 565 | // AutoSaveFilename returns the autosave filename. |
| 566 | func (tb *Buffer) AutoSaveFilename() string { |
| 567 | path, fn := filepath.Split(string(tb.Filename)) |
| 568 | if fn == "" { |
| 569 | fn = "new_file" |
| 570 | } |
| 571 | asfn := filepath.Join(path, "#"+fn+"#") |
| 572 | return asfn |
| 573 | } |
| 574 | |
| 575 | // autoSave does the autosave -- safe to call in a separate goroutine |
| 576 | func (tb *Buffer) autoSave() error { |
no test coverage detected