From 38eda3f1517055d2f917a806d3b3c672d3c7a3e1 Mon Sep 17 00:00:00 2001 From: Caleb John Date: Thu, 17 Sep 2020 02:29:19 -0600 Subject: [PATCH 1/2] Desktop: Fixes #3749: Use joplin list handling in emacs mode (#3758) --- ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.tsx b/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.tsx index 468b90924b..9ecb0ef1ab 100644 --- a/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.tsx +++ b/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.tsx @@ -152,6 +152,10 @@ function Editor(props: EditorProps, ref: any) { 'Insert': 'toggleOverwrite', 'Esc': 'singleSelection', }; + // Add some of the Joplin smart list handling to emacs mode + CodeMirror.keyMap.emacs['Tab'] = 'smartListIndent'; + CodeMirror.keyMap.emacs['Enter'] = 'insertListElement'; + CodeMirror.keyMap.emacs['Shift-Tab'] = 'smartListUnindent'; if (shim.isMac()) { CodeMirror.keyMap.default = { From a7b5d43e6962b0da49465c4e004feb4079b89496 Mon Sep 17 00:00:00 2001 From: Naveen M V <30305957+naviji@users.noreply.github.com> Date: Thu, 17 Sep 2020 08:32:52 +0000 Subject: [PATCH 2/2] Desktop: Fix: Creating a note after backward redirection places it in a wrong notebook (#3759) --- ReactNativeClient/lib/BaseApplication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactNativeClient/lib/BaseApplication.js b/ReactNativeClient/lib/BaseApplication.js index 45fe80613d..9ea13db94e 100644 --- a/ReactNativeClient/lib/BaseApplication.js +++ b/ReactNativeClient/lib/BaseApplication.js @@ -469,7 +469,7 @@ class BaseApplication { refreshNotesUseSelectedNoteId = true; } - if (action.type == 'FOLDER_SELECT' || action.type === 'FOLDER_DELETE' || action.type === 'FOLDER_AND_NOTE_SELECT' || (action.type === 'SEARCH_UPDATE' && newState.notesParentType === 'Folder')) { + if (action.type == 'HISTORY_BACKWARD' || action.type == 'HISTORY_FORWARD' || action.type == 'FOLDER_SELECT' || action.type === 'FOLDER_DELETE' || action.type === 'FOLDER_AND_NOTE_SELECT' || (action.type === 'SEARCH_UPDATE' && newState.notesParentType === 'Folder')) { Setting.setValue('activeFolderId', newState.selectedFolderId); this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null; refreshNotes = true;