diff --git a/lib/howl/buffer.moon b/lib/howl/buffer.moon index 48a9451b..c5df827a 100644 --- a/lib/howl/buffer.moon +++ b/lib/howl/buffer.moon @@ -248,7 +248,7 @@ class Buffer extends PropertyObject @_associate_with_file file @save! - rename: (file) => + rename_file: (file) => old_file = @file @_associate_with_file file @save! @@ -257,7 +257,7 @@ class Buffer extends PropertyObject if not status log.warn "Failed to delete old alias #{old_file} for #{@file}: #{err}" - delete: (file) => + delete_file: (file) => if @file status, err = pcall @file\delete if not status diff --git a/lib/howl/commands/file_commands.moon b/lib/howl/commands/file_commands.moon index 19988443..b9dd6497 100644 --- a/lib/howl/commands/file_commands.moon +++ b/lib/howl/commands/file_commands.moon @@ -173,7 +173,7 @@ command.register command.run 'save-as' return - buffer\rename file + buffer\rename_file file buffer.mode = mode.for_file file log.info ("%s: %d lines, %d bytes written")\format buffer.file.basename, #buffer.lines, #buffer @@ -195,8 +195,9 @@ command.register log.info "Not deleting; buffer not saved" return - buffer\delete! - log.info ("%s has been deleted")\format buffer.file.basename + old_name = buffer.file.basename + buffer\delete_file! + log.info ("%s has been deleted")\format old_name command.register name: 'buffer-close',