mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-28 22:08:12 +09:00
@@ -219,6 +219,7 @@ func (b *Buffer) Serialize() error {
|
|||||||
|
|
||||||
// SaveAs saves the buffer to a specified path (filename), creating the file if it does not exist
|
// SaveAs saves the buffer to a specified path (filename), creating the file if it does not exist
|
||||||
func (b *Buffer) SaveAs(filename string) error {
|
func (b *Buffer) SaveAs(filename string) error {
|
||||||
|
b.FindFileType()
|
||||||
b.UpdateRules()
|
b.UpdateRules()
|
||||||
b.Name = filename
|
b.Name = filename
|
||||||
b.Path = filename
|
b.Path = filename
|
||||||
@@ -235,6 +236,7 @@ func (b *Buffer) SaveAs(filename string) error {
|
|||||||
// SaveAsWithSudo is the same as SaveAs except it uses a neat trick
|
// SaveAsWithSudo is the same as SaveAs except it uses a neat trick
|
||||||
// with tee to use sudo so the user doesn't have to reopen micro with sudo
|
// with tee to use sudo so the user doesn't have to reopen micro with sudo
|
||||||
func (b *Buffer) SaveAsWithSudo(filename string) error {
|
func (b *Buffer) SaveAsWithSudo(filename string) error {
|
||||||
|
b.FindFileType()
|
||||||
b.UpdateRules()
|
b.UpdateRules()
|
||||||
b.Name = filename
|
b.Name = filename
|
||||||
b.Path = filename
|
b.Path = filename
|
||||||
|
|||||||
Reference in New Issue
Block a user