We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 637676d + d5b28c5 commit 1df6432Copy full SHA for 1df6432
1 file changed
main.ts
@@ -562,9 +562,11 @@ export default class VimrcPlugin extends Plugin {
562
} catch (e) {
563
throw new Error(`Cannot read file ${params.args[0]} from vault root: ${e.message}`);
564
}
565
- const command = Function('editor', 'view', content + extraCode);
+ let currentSelections = this.currentSelection;
566
+ var chosenSelection = currentSelections[0];
567
+ const command = Function('editor', 'view', 'selection', content + extraCode);
568
const view = this.getActiveView();
- command(view.editor, view);
569
+ command(view.editor, view, chosenSelection);
570
});
571
572
0 commit comments