Skip to content

Commit 65f3db2

Browse files
committed
fix: select all matches
1 parent ade32f3 commit 65f3db2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "main.js",
66
"scripts": {
77
"build": "wasm-pack build --target web && rollup --config rollup.config.js",
8-
"build:copy": "npm run build && ./copy_to_vault.sh /home/aw/Dropbox/Documents/Other/Obsidian/YouTube"
8+
"build:copy": "npm run build && ./copy_to_vault.sh /home/aw/Documents/Obsidian/anki"
99
},
1010
"keywords": [],
1111
"author": "",

src/rs/matching/link_target_candidate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ impl LinkTargetCandidate {
3939
impl LinkTargetCandidate {
4040
pub fn new(title: String, path: String, aliases: &[String], selected_index: usize) -> Self {
4141
let mut _replacement_candidates: Vec<PreferrableItem> = vec![];
42-
let replacement_candidate_title = PreferrableItem::new(title.clone(), selected_index == 0);
42+
let replacement_candidate_title = PreferrableItem::new(title.clone(), true);
4343
_replacement_candidates.push(replacement_candidate_title);
4444

4545
aliases.iter().enumerate().for_each(|(index, alias)| {
4646
let replacement_candidate_alias = PreferrableItem::new(
4747
alias.clone(),
4848
// add one because the index starts with the title at 0
49-
index + 1 == selected_index,
49+
true,
5050
);
5151
_replacement_candidates.push(replacement_candidate_alias);
5252
});

0 commit comments

Comments
 (0)