You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Desktop: Fixes #5707: Add back text editor commands to Command Palette
This commit is contained in:
@ -56,7 +56,15 @@ function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any, s
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enabledCondition: '!modalDialogVisible && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
|
|
||||||
|
// We disable the editor commands whenever a modal dialog is visible,
|
||||||
|
// otherwise the user might type something in a dialog and accidentally
|
||||||
|
// change something in the editor. However, we still enable them for
|
||||||
|
// GotoAnything so that it's possible to type eg `textBold` and bold the
|
||||||
|
// currently selected text.
|
||||||
|
//
|
||||||
|
// https://github.com/laurent22/joplin/issues/5707
|
||||||
|
enabledCondition: '(!modalDialogVisible || gotoAnythingVisible) && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,11 @@ if [ "$USER_NUM" = "1a" ]; then
|
|||||||
USER_PROFILE_NUM=1a
|
USER_PROFILE_NUM=1a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$USER_NUM" = "1b" ]; then
|
||||||
|
USER_NUM=1
|
||||||
|
USER_PROFILE_NUM=1b
|
||||||
|
fi
|
||||||
|
|
||||||
COMMANDS=($(echo $2 | tr "," "\n"))
|
COMMANDS=($(echo $2 | tr "," "\n"))
|
||||||
PROFILE_DIR=~/.config/joplindev-desktop-$USER_PROFILE_NUM
|
PROFILE_DIR=~/.config/joplindev-desktop-$USER_PROFILE_NUM
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ export default function stateToWhenClauseContext(state: AppState, options: WhenC
|
|||||||
markdownEditorPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('editor'),
|
markdownEditorPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('editor'),
|
||||||
markdownViewerPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('viewer'),
|
markdownViewerPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('viewer'),
|
||||||
modalDialogVisible: !!Object.keys(state.visibleDialogs).length,
|
modalDialogVisible: !!Object.keys(state.visibleDialogs).length,
|
||||||
|
gotoAnythingVisible: !!state.visibleDialogs['gotoAnything'],
|
||||||
sidebarVisible: !!state.mainLayout && layoutItemProp(state.mainLayout, 'sideBar', 'visible'),
|
sidebarVisible: !!state.mainLayout && layoutItemProp(state.mainLayout, 'sideBar', 'visible'),
|
||||||
noteListHasNotes: !!state.notes.length,
|
noteListHasNotes: !!state.notes.length,
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user