Skip to content

Commit

Permalink
Merge pull request #257 from lotabout/ticket-210
Browse files Browse the repository at this point in the history
fix #210: exclude current item in multi-selection
  • Loading branch information
lotabout authored Jan 27, 2020
2 parents e33e134 + cadeef4 commit 067ec36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ impl Selection {

pub fn get_selected_items(&mut self) -> Vec<Arc<Item>> {
// select the current one
if !self.items.is_empty() {
let select_cursor = !self.multi_selection || self.selected.is_empty();
if select_cursor && !self.items.is_empty() {
let cursor = self.item_cursor + self.line_cursor;
let current_item = self
.items
Expand Down

0 comments on commit 067ec36

Please sign in to comment.