Fixed some commands not working through obcommand

This commit is contained in:
Erez Shermer 2021-06-21 10:46:40 +03:00
parent adc96f117e
commit 00861b6544
4 changed files with 8 additions and 4 deletions

View file

@ -117,6 +117,10 @@ Note how `exmap` lists command names without colons and in `nmap` the colon is r
## Changelog
### 0.3.1
- Fixed some commands not working via `obcommand` (https://github.com/esm7/obsidian-vimrc-support/issues/32)
### 0.3.0
- Added a settings file for the Vimrc file name (thank you @SalmanAlSaigal!)

View file

@ -158,9 +158,9 @@ export default class VimrcPlugin extends Plugin {
let editorCallback = availableCommands[command].editorCallback;
let editorCheckCallback = availableCommands[command].editorCheckCallback;
if (editorCheckCallback)
editorCheckCallback(markdownView.editor, false);
editorCheckCallback(false, markdownView.editor, markdownView);
else if (editorCallback)
editorCallback(markdownView.editor);
editorCallback(markdownView.editor, markdownView);
else if (checkCallback)
checkCallback(false);
else if (callback)

View file

@ -1,7 +1,7 @@
{
"id": "obsidian-vimrc-support",
"name": "Vimrc Support",
"version": "0.3.0",
"version": "0.3.1",
"description": "Auto-load a startup file with Obsidian Vim commands.",
"author": "esm",
"authorUrl": "",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-vimrc-support",
"version": "0.3.0",
"version": "0.3.1",
"description": "Auto-load a startup file with Obsidian Vim commands.",
"main": "main.js",
"scripts": {