Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions internal/action/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,7 @@ func (h *BufPane) SaveCmd(args []string) {
if len(args) == 0 {
h.Save()
} else {
err := h.Buf.SaveAs(args[0])
if err != nil {
InfoBar.Error(err)
}
h.saveBufToFile(args[0], "SaveAs", nil)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing action="SaveAs" will in the end cause executing onSaveAs lua callback, which is supposed to be executed by the SaveAs action, not by a command?

Copy link
Contributor Author

@Neko-Box-Coder Neko-Box-Coder Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the if block few lines above which calls Save() will also cause a lua callback. I don't mind either way to have an action or not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the if block few lines above which calls Save() will also cause a lua callback. I don't mind either way to have an action or not.

Good point. Ok, maybe some users are already relying on that, so let's stay consistent with this inconsistency...

}
}

Expand Down