mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-25 19:25:06 +00:00
Minor cleanup in push_edit
This commit is contained in:
parent
3fcc6482cb
commit
8bb442f135
1 changed files with 4 additions and 4 deletions
|
@ -186,15 +186,15 @@ impl EditableLine {
|
|||
return;
|
||||
}
|
||||
|
||||
if range.is_empty() && edit.replacement.is_empty() {
|
||||
return; // nop
|
||||
}
|
||||
|
||||
// Assign a new group id or propagate the old one if we're in a logical grouping of edits
|
||||
if self.edit_group_level.is_some() {
|
||||
edit.group_id = Some(self.edit_group_id);
|
||||
}
|
||||
|
||||
let edit_does_nothing = range.is_empty() && edit.replacement.is_empty();
|
||||
if edit_does_nothing {
|
||||
return;
|
||||
}
|
||||
if self.undo_history.edits_applied != self.undo_history.edits.len() {
|
||||
// After undoing some edits, the user is making a new edit;
|
||||
// we are about to create a new edit branch.
|
||||
|
|
Loading…
Reference in a new issue