1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Fixes #10895: Fix alt+up/alt+down fails to re-order multiple lines (#10899)

This commit is contained in:
Henry Heino
2024-08-22 13:52:22 -07:00
committed by GitHub
parent ea420967c4
commit 6a0dd4e20d
5 changed files with 3 additions and 89 deletions

View File

@ -1,13 +1,12 @@
import { EditorView } from '@codemirror/view';
import { EditorCommandType, ListType } from '../../types';
import { undo, redo, selectAll, indentSelection, cursorDocStart, cursorDocEnd, cursorLineStart, cursorLineEnd, deleteToLineStart, deleteToLineEnd, undoSelection, redoSelection, cursorPageDown, cursorPageUp, cursorCharRight, cursorCharLeft, insertNewlineAndIndent, cursorLineDown, cursorLineUp, toggleComment, deleteLine } from '@codemirror/commands';
import { undo, redo, selectAll, indentSelection, cursorDocStart, cursorDocEnd, cursorLineStart, cursorLineEnd, deleteToLineStart, deleteToLineEnd, undoSelection, redoSelection, cursorPageDown, cursorPageUp, cursorCharRight, cursorCharLeft, insertNewlineAndIndent, cursorLineDown, cursorLineUp, toggleComment, deleteLine, moveLineUp, moveLineDown } from '@codemirror/commands';
import {
decreaseIndent, increaseIndent,
toggleBolded, toggleCode,
toggleHeaderLevel, toggleItalicized,
toggleList, toggleMath,
} from '../markdown/markdownCommands';
import swapLine, { SwapLineDirection } from './swapLine';
import duplicateLine from './duplicateLine';
import sortSelectedLines from './sortSelectedLines';
import { closeSearchPanel, findNext, findPrevious, openSearchPanel, replaceAll, replaceNext } from '@codemirror/search';
@ -55,8 +54,8 @@ const editorCommands: Record<EditorCommandType, EditorCommandFunction> = {
[EditorCommandType.IndentLess]: decreaseIndent,
[EditorCommandType.IndentAuto]: indentSelection,
[EditorCommandType.InsertNewlineAndIndent]: insertNewlineAndIndent,
[EditorCommandType.SwapLineUp]: swapLine(SwapLineDirection.Up),
[EditorCommandType.SwapLineDown]: swapLine(SwapLineDirection.Down),
[EditorCommandType.SwapLineUp]: moveLineUp,
[EditorCommandType.SwapLineDown]: moveLineDown,
[EditorCommandType.GoDocEnd]: cursorDocEnd,
[EditorCommandType.GoDocStart]: cursorDocStart,
[EditorCommandType.GoLineStart]: cursorLineStart,