Skip to content

Commit

Permalink
Fix bugs caught in code review (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyr committed Oct 7, 2020
1 parent 8365d9c commit 61a2c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions druid/src/text/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<T: TextStorage + EditableText> Editor<T> {
}
}
EditAction::Drag(action) => self.selection.end = action.column,
_ => (),
EditAction::SelectAll => self.selection = Selection::new(0, data.len()),
}
}

Expand Down Expand Up @@ -240,7 +240,7 @@ impl<T: TextStorage + EditableText> Editor<T> {

fn delete_forward(&mut self, data: &mut T) {
let to_delete = if self.selection.is_caret() {
movement(Movement::Right, self.selection, data, false)
movement(Movement::Right, self.selection, data, true)
} else {
self.selection
};
Expand Down

0 comments on commit 61a2c62

Please sign in to comment.