Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only pluralise "buffer" when required #11018

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
10 changes: 6 additions & 4 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ fn buffer_close_by_ids_impl(
cx.editor.switch(*first, Action::Replace);
}
bail!(
"{} unsaved buffer(s) remaining: {:?}",
"{} unsaved buffer{} remaining: {:?}",
modified_names.len(),
modified_names
if modified_names.len() != 1 { "s" } else { "" },
thomasschafer marked this conversation as resolved.
Show resolved Hide resolved
modified_names,
);
}

Expand Down Expand Up @@ -658,9 +659,10 @@ pub(super) fn buffers_remaining_impl(editor: &mut Editor) -> anyhow::Result<()>
editor.switch(*first, Action::Replace);
}
bail!(
"{} unsaved buffer(s) remaining: {:?}",
"{} unsaved buffer{} remaining: {:?}",
modified_names.len(),
modified_names
if modified_names.len() != 1 { "s" } else { "" },
thomasschafer marked this conversation as resolved.
Show resolved Hide resolved
modified_names,
);
}
Ok(())
Expand Down
Loading