monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +30 -4
- package/esm/vs/base/browser/dom.js +1 -4
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +25 -11
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +15 -8
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/list.css +1 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +11 -2
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/defaultAccount.js +6 -0
- package/esm/vs/base/common/defaultAccount.js.map +1 -0
- package/esm/vs/base/common/equals.js +73 -24
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +14 -4
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keybindings.js +0 -8
- package/esm/vs/base/common/keybindings.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +2 -2
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/marshallingIds.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +1 -1
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/strings.js +3 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/view.js +11 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
- package/esm/vs/editor/common/config/fontInfo.js +1 -1
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +19 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
- package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
- package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
- package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
- package/esm/vs/editor/common/languages.js +2 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/decorationProvider.js +21 -1
- package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +49 -30
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
- package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
- package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +34 -3
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +11 -5
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
- package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/log/common/log.js +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +6 -6
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
- package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
- package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
- package/esm/vs/platform/window/common/window.js +1 -1
- package/esm/vs/platform/window/common/window.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +34 -3
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
- package/esm/vs/platform/product/common/productService.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/cursor/cursorMoveCommands.ts","vs/editor/common/cursor/cursorMoveCommands.ts"],"names":[],"mappings":"AAAA;;;gGAG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YACP,KAAK,WAAA,OAAO,CAAC,SAAS;gBACrB,IAAI,yBAAiB,CAAC;gBACtB,MAAM;YACP,KAAK,WAAA,OAAO,CAAC,QAAQ;gBACpB,IAAI,wBAAgB,CAAC;gBACrB,MAAM;QACR,CAAC;QAED,OAAO;YACN,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YACxB,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;SAC7B,CAAC;IACH,CAAC;IAjFe,gBAAK,QAiFpB,CAAA;AAmEF,CAAC,EAtRgB,UAAU,KAAV,UAAU,QAsR1B","file":"cursorMoveCommands.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as types from '../../../base/common/types.js';\nimport { CursorState, ICursorSimpleModel, PartialCursorState, SelectionStartKind, SingleCursorState } from '../cursorCommon.js';\nimport { MoveOperations } from './cursorMoveOperations.js';\nimport { WordOperations } from './cursorWordOperations.js';\nimport { IPosition, Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { ICommandMetadata } from '../../../platform/commands/common/commands.js';\nimport { IViewModel } from '../viewModel.js';\nimport { TextDirection } from '../model.js';\n\nexport class CursorMoveCommands {\n\n\tpublic static addCursorDown(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static addCursorUp(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineStart(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\tconst currentViewStateColumn = cursor.viewState.position.column;\n\t\tconst currentModelStateColumn = cursor.modelState.position.column;\n\t\tconst isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\n\n\t\tconst currentViewStatelineNumber = cursor.viewState.position.lineNumber;\n\t\tconst firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\n\t\tconst isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\n\n\t\tif (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\n\t\t\treturn this._moveToLineStartByView(viewModel, cursor, inSelectionMode);\n\t\t} else {\n\t\t\treturn this._moveToLineStartByModel(viewModel, cursor, inSelectionMode);\n\t\t}\n\t}\n\n\tprivate static _moveToLineStartByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)\n\t\t);\n\t}\n\n\tprivate static _moveToLineStartByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)\n\t\t);\n\t}\n\n\tpublic static moveToEndOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, sticky: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineEnd(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\tconst viewStatePosition = cursor.viewState.position;\n\t\tconst viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\n\t\tconst isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\n\n\t\tconst modelStatePosition = cursor.modelState.position;\n\t\tconst modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber);\n\t\tconst isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\n\n\t\tif (isEndOfViewLine || isEndLineOfWrappedLine) {\n\t\t\treturn this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky);\n\t\t} else {\n\t\t\treturn this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\t}\n\n\tprivate static _moveToLineEndByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tprivate static _moveToLineEndByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tpublic static expandLineSelection(viewModel: IViewModel, cursors: CursorState[]): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\n\t\t\tconst startLineNumber = cursor.modelState.selection.startLineNumber;\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet endLineNumber = cursor.modelState.selection.endLineNumber;\n\t\t\tlet endColumn: number;\n\t\t\tif (endLineNumber === lineCount) {\n\t\t\t\tendColumn = viewModel.model.getLineMaxColumn(lineCount);\n\t\t\t} else {\n\t\t\t\tendLineNumber++;\n\t\t\t\tendColumn = 1;\n\t\t\t}\n\n\t\t\tresult[i] = CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(startLineNumber, 1, startLineNumber, 1), SelectionStartKind.Simple, 0,\n\t\t\t\tnew Position(endLineNumber, endColumn), 0\n\t\t\t));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToEndOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static selectAll(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tconst lineCount = viewModel.model.getLineCount();\n\t\tconst maxColumn = viewModel.model.getLineMaxColumn(lineCount);\n\n\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\tnew Range(1, 1, 1, 1), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineCount, maxColumn), 0\n\t\t));\n\t}\n\n\tpublic static line(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\n\t\tif (!inSelectionMode) {\n\t\t\t// Entering line selection for the first time\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToColumn = 1;\n\t\t\tif (selectToLineNumber > lineCount) {\n\t\t\t\tselectToLineNumber = lineCount;\n\t\t\t\tselectToColumn = viewModel.getLineMaxColumn(selectToLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\t\tnew Range(viewPosition.lineNumber, 1, selectToLineNumber, selectToColumn), SelectionStartKind.Line, 0,\n\t\t\t\tnew Position(selectToLineNumber, selectToColumn), 0\n\t\t\t));\n\t\t}\n\n\t\t// Continuing line selection\n\t\tconst enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\n\n\t\tif (position.lineNumber < enteringLineNumber) {\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, viewPosition.lineNumber, 1, 0\n\t\t\t));\n\n\t\t} else if (position.lineNumber > enteringLineNumber) {\n\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToViewLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToViewColumn = 1;\n\t\t\tif (selectToViewLineNumber > lineCount) {\n\t\t\t\tselectToViewLineNumber = lineCount;\n\t\t\t\tselectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, selectToViewLineNumber, selectToViewColumn, 0\n\t\t\t));\n\n\t\t} else {\n\n\t\t\tconst endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\n\t\t\treturn CursorState.fromModelState(cursor.modelState.move(\n\t\t\t\ttrue, endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0\n\t\t\t));\n\n\t\t}\n\t}\n\n\tpublic static word(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\treturn CursorState.fromModelState(WordOperations.word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position));\n\t}\n\n\tpublic static cancelSelection(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tif (!cursor.modelState.hasSelection()) {\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\t\t}\n\n\t\tconst lineNumber = cursor.viewState.position.lineNumber;\n\t\tconst column = cursor.viewState.position.column;\n\n\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\tnew Range(lineNumber, column, lineNumber, column), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineNumber, column), 0\n\t\t));\n\t}\n\n\tpublic static moveTo(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tif (inSelectionMode) {\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Word) {\n\t\t\t\treturn this.word(viewModel, cursor, inSelectionMode, _position);\n\t\t\t}\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Line) {\n\t\t\t\treturn this.line(viewModel, cursor, inSelectionMode, _position, _viewPosition);\n\t\t\t}\n\t\t}\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\n\t}\n\n\tpublic static simpleMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.SimpleMoveDirection, inSelectionMode: boolean, value: number, unit: CursorMove.Unit): PartialCursorState[] | null {\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.Left: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move left by half the current line length\n\t\t\t\t\treturn this._moveHalfLineLeft(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move left by `moveParams.value` columns\n\t\t\t\t\treturn this._moveLeft(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Right: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move right by half the current line length\n\t\t\t\t\treturn this._moveHalfLineRight(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move right by `moveParams.value` columns\n\t\t\t\t\treturn this._moveRight(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Up: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move up by view lines\n\t\t\t\t\treturn this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move up by model lines\n\t\t\t\t\treturn this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Down: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move down by view lines\n\t\t\t\t\treturn this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move down by model lines\n\t\t\t\t\treturn this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.PrevBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.NextBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineStart: {\n\t\t\t\t// Move to the beginning of the current view line\n\t\t\t\treturn this._moveToViewMinColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineFirstNonWhitespaceCharacter: {\n\t\t\t\t// Move to the first non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineColumnCenter: {\n\t\t\t\t// Move to the \"center\" of the current view line\n\t\t\t\treturn this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineEnd: {\n\t\t\t\t// Move to the end of the current view line\n\t\t\t\treturn this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineLastNonWhitespaceCharacter: {\n\t\t\t\t// Move to the last non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\n\t}\n\n\tpublic static viewportMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.ViewportDirection, inSelectionMode: boolean, value: number): PartialCursorState[] | null {\n\t\tconst visibleViewRange = viewModel.getCompletelyVisibleViewRange();\n\t\tconst visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.ViewPortTop: {\n\t\t\t\t// Move to the nth line start in the viewport (from the top)\n\t\t\t\tconst modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortBottom: {\n\t\t\t\t// Move to the nth line start in the viewport (from the bottom)\n\t\t\t\tconst modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortCenter: {\n\t\t\t\t// Move to the line start in the viewport center\n\t\t\t\tconst modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortIfOutside: {\n\t\t\t\t// Move to a position inside the viewport\n\t\t\t\tconst result: PartialCursorState[] = [];\n\t\t\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\t\t\tconst cursor = cursors[i];\n\t\t\t\t\tresult[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic static findPositionInViewportIfOutside(viewModel: IViewModel, cursor: CursorState, visibleViewRange: Range, inSelectionMode: boolean): PartialCursorState {\n\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\n\t\tif (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\n\t\t\t// Nothing to do, cursor is in viewport\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\n\t\t} else {\n\t\t\tlet newViewLineNumber: number;\n\t\t\tif (viewLineNumber > visibleViewRange.endLineNumber - 1) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.endLineNumber - 1;\n\t\t\t} else if (viewLineNumber < visibleViewRange.startLineNumber) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.startLineNumber;\n\t\t\t} else {\n\t\t\t\tnewViewLineNumber = viewLineNumber;\n\t\t\t}\n\t\t\tconst position = MoveOperations.vertical(viewModel.cursorConfig, viewModel, viewLineNumber, cursor.viewState.position.column, cursor.viewState.leftoverVisibleColumns, newViewLineNumber, false);\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, position.lineNumber, position.column, position.leftoverVisibleColumns));\n\t\t}\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the start).\n\t */\n\tprivate static _firstLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.min(range.endLineNumber, startLineNumber + count - 1);\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the end).\n\t */\n\tprivate static _lastLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.max(startLineNumber, range.endLineNumber - count + 1);\n\t}\n\n\tprivate static _moveLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toViewLineNumber: number, toViewColumn: number): PartialCursorState {\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\n\t}\n\n\tprivate static _moveToModelPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toModelLineNumber: number, toModelColumn: number): PartialCursorState {\n\t\treturn CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\n\t}\n\n\tprivate static _moveToViewMinColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMinColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewFirstNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewCenterColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewMaxColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMaxColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewLastNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport namespace CursorMove {\n\n\tconst isCursorMoveArgs = function (arg: unknown): boolean {\n\t\tif (!types.isObject(arg)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst cursorMoveArg: RawArguments = arg as RawArguments;\n\n\t\tif (!types.isString(cursorMoveArg.to)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.select) && !types.isBoolean(cursorMoveArg.select)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.by) && !types.isString(cursorMoveArg.by)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.value) && !types.isNumber(cursorMoveArg.value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.noHistory) && !types.isBoolean(cursorMoveArg.noHistory)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\texport const metadata: ICommandMetadata = {\n\t\tdescription: 'Move cursor to a logical position in the view',\n\t\targs: [\n\t\t\t{\n\t\t\t\tname: 'Cursor move argument object',\n\t\t\t\tdescription: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t\t* 'noHistory': If 'true' does not add the movement to navigation history. Default is 'false'.\n\t\t\t\t`,\n\t\t\t\tconstraint: isCursorMoveArgs,\n\t\t\t\tschema: {\n\t\t\t\t\t'type': 'object',\n\t\t\t\t\t'required': ['to'],\n\t\t\t\t\t'properties': {\n\t\t\t\t\t\t'to': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'by': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['line', 'wrappedLine', 'character', 'halfLine']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'value': {\n\t\t\t\t\t\t\t'type': 'number',\n\t\t\t\t\t\t\t'default': 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'select': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'noHistory': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t};\n\n\t/**\n\t * Positions in the view for cursor move command.\n\t */\n\texport const RawDirection = {\n\t\tLeft: 'left',\n\t\tRight: 'right',\n\t\tUp: 'up',\n\t\tDown: 'down',\n\n\t\tPrevBlankLine: 'prevBlankLine',\n\t\tNextBlankLine: 'nextBlankLine',\n\n\t\tWrappedLineStart: 'wrappedLineStart',\n\t\tWrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\n\t\tWrappedLineColumnCenter: 'wrappedLineColumnCenter',\n\t\tWrappedLineEnd: 'wrappedLineEnd',\n\t\tWrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\n\n\t\tViewPortTop: 'viewPortTop',\n\t\tViewPortCenter: 'viewPortCenter',\n\t\tViewPortBottom: 'viewPortBottom',\n\n\t\tViewPortIfOutside: 'viewPortIfOutside'\n\t};\n\n\t/**\n\t * Units for Cursor move 'by' argument\n\t */\n\texport const RawUnit = {\n\t\tLine: 'line',\n\t\tWrappedLine: 'wrappedLine',\n\t\tCharacter: 'character',\n\t\tHalfLine: 'halfLine'\n\t};\n\n\t/**\n\t * Arguments for Cursor move command\n\t */\n\texport interface RawArguments {\n\t\tto: string;\n\t\tselect?: boolean;\n\t\tby?: string;\n\t\tvalue?: number;\n\t\tnoHistory?: boolean;\n\t}\n\n\texport function parse(args: Partial<RawArguments>): ParsedArguments | null {\n\t\tif (!args.to) {\n\t\t\t// illegal arguments\n\t\t\treturn null;\n\t\t}\n\n\t\tlet direction: Direction;\n\t\tswitch (args.to) {\n\t\t\tcase RawDirection.Left:\n\t\t\t\tdirection = Direction.Left;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Right:\n\t\t\t\tdirection = Direction.Right;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Up:\n\t\t\t\tdirection = Direction.Up;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Down:\n\t\t\t\tdirection = Direction.Down;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.PrevBlankLine:\n\t\t\t\tdirection = Direction.PrevBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.NextBlankLine:\n\t\t\t\tdirection = Direction.NextBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineStart:\n\t\t\t\tdirection = Direction.WrappedLineStart;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineFirstNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineFirstNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineColumnCenter:\n\t\t\t\tdirection = Direction.WrappedLineColumnCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineEnd:\n\t\t\t\tdirection = Direction.WrappedLineEnd;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineLastNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineLastNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortTop:\n\t\t\t\tdirection = Direction.ViewPortTop;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortBottom:\n\t\t\t\tdirection = Direction.ViewPortBottom;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortCenter:\n\t\t\t\tdirection = Direction.ViewPortCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortIfOutside:\n\t\t\t\tdirection = Direction.ViewPortIfOutside;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// illegal arguments\n\t\t\t\treturn null;\n\t\t}\n\n\t\tlet unit = Unit.None;\n\t\tswitch (args.by) {\n\t\t\tcase RawUnit.Line:\n\t\t\t\tunit = Unit.Line;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.WrappedLine:\n\t\t\t\tunit = Unit.WrappedLine;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.Character:\n\t\t\t\tunit = Unit.Character;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.HalfLine:\n\t\t\t\tunit = Unit.HalfLine;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tdirection: direction,\n\t\t\tunit: unit,\n\t\t\tselect: (!!args.select),\n\t\t\tvalue: (args.value || 1),\n\t\t\tnoHistory: (!!args.noHistory)\n\t\t};\n\t}\n\n\texport interface ParsedArguments {\n\t\tdirection: Direction;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t\tnoHistory: boolean;\n\t}\n\n\texport interface SimpleMoveArguments {\n\t\tdirection: SimpleMoveDirection;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t}\n\n\texport const enum Direction {\n\t\tLeft,\n\t\tRight,\n\t\tUp,\n\t\tDown,\n\t\tPrevBlankLine,\n\t\tNextBlankLine,\n\n\t\tWrappedLineStart,\n\t\tWrappedLineFirstNonWhitespaceCharacter,\n\t\tWrappedLineColumnCenter,\n\t\tWrappedLineEnd,\n\t\tWrappedLineLastNonWhitespaceCharacter,\n\n\t\tViewPortTop,\n\t\tViewPortCenter,\n\t\tViewPortBottom,\n\n\t\tViewPortIfOutside,\n\t}\n\n\texport type SimpleMoveDirection = (\n\t\tDirection.Left\n\t\t| Direction.Right\n\t\t| Direction.Up\n\t\t| Direction.Down\n\t\t| Direction.PrevBlankLine\n\t\t| Direction.NextBlankLine\n\t\t| Direction.WrappedLineStart\n\t\t| Direction.WrappedLineFirstNonWhitespaceCharacter\n\t\t| Direction.WrappedLineColumnCenter\n\t\t| Direction.WrappedLineEnd\n\t\t| Direction.WrappedLineLastNonWhitespaceCharacter\n\t);\n\n\texport type ViewportDirection = (\n\t\tDirection.ViewPortTop\n\t\t| Direction.ViewPortCenter\n\t\t| Direction.ViewPortBottom\n\t\t| Direction.ViewPortIfOutside\n\t);\n\n\texport const enum Unit {\n\t\tNone,\n\t\tLine,\n\t\tWrappedLine,\n\t\tCharacter,\n\t\tHalfLine,\n\t}\n\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as types from '../../../base/common/types.js';\nimport { CursorState, ICursorSimpleModel, PartialCursorState, SelectionStartKind, SingleCursorState } from '../cursorCommon.js';\nimport { MoveOperations } from './cursorMoveOperations.js';\nimport { WordOperations } from './cursorWordOperations.js';\nimport { IPosition, Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { ICommandMetadata } from '../../../platform/commands/common/commands.js';\nimport { IViewModel } from '../viewModel.js';\nimport { TextDirection } from '../model.js';\n\nexport class CursorMoveCommands {\n\n\tpublic static addCursorDown(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static addCursorUp(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineStart(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\tconst currentViewStateColumn = cursor.viewState.position.column;\n\t\tconst currentModelStateColumn = cursor.modelState.position.column;\n\t\tconst isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\n\n\t\tconst currentViewStatelineNumber = cursor.viewState.position.lineNumber;\n\t\tconst firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\n\t\tconst isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\n\n\t\tif (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\n\t\t\treturn this._moveToLineStartByView(viewModel, cursor, inSelectionMode);\n\t\t} else {\n\t\t\treturn this._moveToLineStartByModel(viewModel, cursor, inSelectionMode);\n\t\t}\n\t}\n\n\tprivate static _moveToLineStartByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)\n\t\t);\n\t}\n\n\tprivate static _moveToLineStartByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)\n\t\t);\n\t}\n\n\tpublic static moveToEndOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, sticky: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineEnd(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\tconst viewStatePosition = cursor.viewState.position;\n\t\tconst viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\n\t\tconst isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\n\n\t\tconst modelStatePosition = cursor.modelState.position;\n\t\tconst modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber);\n\t\tconst isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\n\n\t\tif (isEndOfViewLine || isEndLineOfWrappedLine) {\n\t\t\treturn this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky);\n\t\t} else {\n\t\t\treturn this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\t}\n\n\tprivate static _moveToLineEndByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tprivate static _moveToLineEndByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tpublic static expandLineSelection(viewModel: IViewModel, cursors: CursorState[]): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\n\t\t\tconst startLineNumber = cursor.modelState.selection.startLineNumber;\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet endLineNumber = cursor.modelState.selection.endLineNumber;\n\t\t\tlet endColumn: number;\n\t\t\tif (endLineNumber === lineCount) {\n\t\t\t\tendColumn = viewModel.model.getLineMaxColumn(lineCount);\n\t\t\t} else {\n\t\t\t\tendLineNumber++;\n\t\t\t\tendColumn = 1;\n\t\t\t}\n\n\t\t\tresult[i] = CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(startLineNumber, 1, startLineNumber, 1), SelectionStartKind.Simple, 0,\n\t\t\t\tnew Position(endLineNumber, endColumn), 0\n\t\t\t));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToEndOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static selectAll(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tconst lineCount = viewModel.model.getLineCount();\n\t\tconst maxColumn = viewModel.model.getLineMaxColumn(lineCount);\n\n\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\tnew Range(1, 1, 1, 1), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineCount, maxColumn), 0\n\t\t));\n\t}\n\n\tpublic static line(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\n\t\tif (!inSelectionMode) {\n\t\t\t// Entering line selection for the first time\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToColumn = 1;\n\t\t\tif (selectToLineNumber > lineCount) {\n\t\t\t\tselectToLineNumber = lineCount;\n\t\t\t\tselectToColumn = viewModel.getLineMaxColumn(selectToLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\t\tnew Range(viewPosition.lineNumber, 1, selectToLineNumber, selectToColumn), SelectionStartKind.Line, 0,\n\t\t\t\tnew Position(selectToLineNumber, selectToColumn), 0\n\t\t\t));\n\t\t}\n\n\t\t// Continuing line selection\n\t\tconst enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\n\n\t\tif (position.lineNumber < enteringLineNumber) {\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, viewPosition.lineNumber, 1, 0\n\t\t\t));\n\n\t\t} else if (position.lineNumber > enteringLineNumber) {\n\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToViewLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToViewColumn = 1;\n\t\t\tif (selectToViewLineNumber > lineCount) {\n\t\t\t\tselectToViewLineNumber = lineCount;\n\t\t\t\tselectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, selectToViewLineNumber, selectToViewColumn, 0\n\t\t\t));\n\n\t\t} else {\n\n\t\t\tconst endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\n\t\t\treturn CursorState.fromModelState(cursor.modelState.move(\n\t\t\t\ttrue, endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0\n\t\t\t));\n\n\t\t}\n\t}\n\n\tpublic static word(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\treturn CursorState.fromModelState(WordOperations.word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position));\n\t}\n\n\tpublic static cancelSelection(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tif (!cursor.modelState.hasSelection()) {\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\t\t}\n\n\t\tconst lineNumber = cursor.viewState.position.lineNumber;\n\t\tconst column = cursor.viewState.position.column;\n\n\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\tnew Range(lineNumber, column, lineNumber, column), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineNumber, column), 0\n\t\t));\n\t}\n\n\tpublic static moveTo(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tif (inSelectionMode) {\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Word) {\n\t\t\t\treturn this.word(viewModel, cursor, inSelectionMode, _position);\n\t\t\t}\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Line) {\n\t\t\t\treturn this.line(viewModel, cursor, inSelectionMode, _position, _viewPosition);\n\t\t\t}\n\t\t}\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\n\t}\n\n\tpublic static simpleMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.SimpleMoveDirection, inSelectionMode: boolean, value: number, unit: CursorMove.Unit): PartialCursorState[] | null {\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.Left: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move left by half the current line length\n\t\t\t\t\treturn this._moveHalfLineLeft(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move left by `moveParams.value` columns\n\t\t\t\t\treturn this._moveLeft(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Right: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move right by half the current line length\n\t\t\t\t\treturn this._moveHalfLineRight(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move right by `moveParams.value` columns\n\t\t\t\t\treturn this._moveRight(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Up: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move up by view lines\n\t\t\t\t\treturn this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move up by model lines\n\t\t\t\t\treturn this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Down: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move down by view lines\n\t\t\t\t\treturn this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move down by model lines\n\t\t\t\t\treturn this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.PrevBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.NextBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineStart: {\n\t\t\t\t// Move to the beginning of the current view line\n\t\t\t\treturn this._moveToViewMinColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineFirstNonWhitespaceCharacter: {\n\t\t\t\t// Move to the first non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineColumnCenter: {\n\t\t\t\t// Move to the \"center\" of the current view line\n\t\t\t\treturn this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineEnd: {\n\t\t\t\t// Move to the end of the current view line\n\t\t\t\treturn this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineLastNonWhitespaceCharacter: {\n\t\t\t\t// Move to the last non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\n\t}\n\n\tpublic static viewportMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.ViewportDirection, inSelectionMode: boolean, value: number): PartialCursorState[] | null {\n\t\tconst visibleViewRange = viewModel.getCompletelyVisibleViewRange();\n\t\tconst visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.ViewPortTop: {\n\t\t\t\t// Move to the nth line start in the viewport (from the top)\n\t\t\t\tconst modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortBottom: {\n\t\t\t\t// Move to the nth line start in the viewport (from the bottom)\n\t\t\t\tconst modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortCenter: {\n\t\t\t\t// Move to the line start in the viewport center\n\t\t\t\tconst modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortIfOutside: {\n\t\t\t\t// Move to a position inside the viewport\n\t\t\t\tconst result: PartialCursorState[] = [];\n\t\t\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\t\t\tconst cursor = cursors[i];\n\t\t\t\t\tresult[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic static findPositionInViewportIfOutside(viewModel: IViewModel, cursor: CursorState, visibleViewRange: Range, inSelectionMode: boolean): PartialCursorState {\n\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\n\t\tif (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\n\t\t\t// Nothing to do, cursor is in viewport\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\n\t\t} else {\n\t\t\tlet newViewLineNumber: number;\n\t\t\tif (viewLineNumber > visibleViewRange.endLineNumber - 1) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.endLineNumber - 1;\n\t\t\t} else if (viewLineNumber < visibleViewRange.startLineNumber) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.startLineNumber;\n\t\t\t} else {\n\t\t\t\tnewViewLineNumber = viewLineNumber;\n\t\t\t}\n\t\t\tconst position = MoveOperations.vertical(viewModel.cursorConfig, viewModel, viewLineNumber, cursor.viewState.position.column, cursor.viewState.leftoverVisibleColumns, newViewLineNumber, false);\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, position.lineNumber, position.column, position.leftoverVisibleColumns));\n\t\t}\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the start).\n\t */\n\tprivate static _firstLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.min(range.endLineNumber, startLineNumber + count - 1);\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the end).\n\t */\n\tprivate static _lastLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.max(startLineNumber, range.endLineNumber - count + 1);\n\t}\n\n\tprivate static _moveLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toViewLineNumber: number, toViewColumn: number): PartialCursorState {\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\n\t}\n\n\tprivate static _moveToModelPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toModelLineNumber: number, toModelColumn: number): PartialCursorState {\n\t\treturn CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\n\t}\n\n\tprivate static _moveToViewMinColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMinColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewFirstNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewCenterColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewMaxColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMaxColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewLastNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport namespace CursorMove {\n\n\tconst isCursorMoveArgs = function (arg: unknown): boolean {\n\t\tif (!types.isObject(arg)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst cursorMoveArg: RawArguments = arg as RawArguments;\n\n\t\tif (!types.isString(cursorMoveArg.to)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.select) && !types.isBoolean(cursorMoveArg.select)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.by) && !types.isString(cursorMoveArg.by)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.value) && !types.isNumber(cursorMoveArg.value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.noHistory) && !types.isBoolean(cursorMoveArg.noHistory)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\texport const metadata: ICommandMetadata = {\n\t\tdescription: 'Move cursor to a logical position in the view',\n\t\targs: [\n\t\t\t{\n\t\t\t\tname: 'Cursor move argument object',\n\t\t\t\tdescription: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t\t* 'noHistory': If 'true' does not add the movement to navigation history. Default is 'false'.\n\t\t\t\t`,\n\t\t\t\tconstraint: isCursorMoveArgs,\n\t\t\t\tschema: {\n\t\t\t\t\t'type': 'object',\n\t\t\t\t\t'required': ['to'],\n\t\t\t\t\t'properties': {\n\t\t\t\t\t\t'to': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'by': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['line', 'wrappedLine', 'character', 'halfLine']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'value': {\n\t\t\t\t\t\t\t'type': 'number',\n\t\t\t\t\t\t\t'default': 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'select': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'noHistory': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t};\n\n\t/**\n\t * Positions in the view for cursor move command.\n\t */\n\texport const RawDirection = {\n\t\tLeft: 'left',\n\t\tRight: 'right',\n\t\tUp: 'up',\n\t\tDown: 'down',\n\n\t\tPrevBlankLine: 'prevBlankLine',\n\t\tNextBlankLine: 'nextBlankLine',\n\n\t\tWrappedLineStart: 'wrappedLineStart',\n\t\tWrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\n\t\tWrappedLineColumnCenter: 'wrappedLineColumnCenter',\n\t\tWrappedLineEnd: 'wrappedLineEnd',\n\t\tWrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\n\n\t\tViewPortTop: 'viewPortTop',\n\t\tViewPortCenter: 'viewPortCenter',\n\t\tViewPortBottom: 'viewPortBottom',\n\n\t\tViewPortIfOutside: 'viewPortIfOutside'\n\t};\n\n\t/**\n\t * Units for Cursor move 'by' argument\n\t */\n\texport const RawUnit = {\n\t\tLine: 'line',\n\t\tWrappedLine: 'wrappedLine',\n\t\tCharacter: 'character',\n\t\tHalfLine: 'halfLine'\n\t};\n\n\t/**\n\t * Arguments for Cursor move command\n\t */\n\texport interface RawArguments {\n\t\tto: string;\n\t\tselect?: boolean;\n\t\tby?: string;\n\t\tvalue?: number;\n\t\tnoHistory?: boolean;\n\t}\n\n\texport function parse(args: Partial<RawArguments>): ParsedArguments | null {\n\t\tif (!args.to) {\n\t\t\t// illegal arguments\n\t\t\treturn null;\n\t\t}\n\n\t\tlet direction: Direction;\n\t\tswitch (args.to) {\n\t\t\tcase RawDirection.Left:\n\t\t\t\tdirection = Direction.Left;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Right:\n\t\t\t\tdirection = Direction.Right;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Up:\n\t\t\t\tdirection = Direction.Up;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Down:\n\t\t\t\tdirection = Direction.Down;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.PrevBlankLine:\n\t\t\t\tdirection = Direction.PrevBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.NextBlankLine:\n\t\t\t\tdirection = Direction.NextBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineStart:\n\t\t\t\tdirection = Direction.WrappedLineStart;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineFirstNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineFirstNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineColumnCenter:\n\t\t\t\tdirection = Direction.WrappedLineColumnCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineEnd:\n\t\t\t\tdirection = Direction.WrappedLineEnd;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineLastNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineLastNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortTop:\n\t\t\t\tdirection = Direction.ViewPortTop;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortBottom:\n\t\t\t\tdirection = Direction.ViewPortBottom;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortCenter:\n\t\t\t\tdirection = Direction.ViewPortCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortIfOutside:\n\t\t\t\tdirection = Direction.ViewPortIfOutside;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// illegal arguments\n\t\t\t\treturn null;\n\t\t}\n\n\t\tlet unit = Unit.None;\n\t\tswitch (args.by) {\n\t\t\tcase RawUnit.Line:\n\t\t\t\tunit = Unit.Line;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.WrappedLine:\n\t\t\t\tunit = Unit.WrappedLine;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.Character:\n\t\t\t\tunit = Unit.Character;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.HalfLine:\n\t\t\t\tunit = Unit.HalfLine;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tdirection: direction,\n\t\t\tunit: unit,\n\t\t\tselect: (!!args.select),\n\t\t\tvalue: (args.value || 1),\n\t\t\tnoHistory: (!!args.noHistory)\n\t\t};\n\t}\n\n\texport interface ParsedArguments {\n\t\tdirection: Direction;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t\tnoHistory: boolean;\n\t}\n\n\texport interface SimpleMoveArguments {\n\t\tdirection: SimpleMoveDirection;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t}\n\n\texport const enum Direction {\n\t\tLeft,\n\t\tRight,\n\t\tUp,\n\t\tDown,\n\t\tPrevBlankLine,\n\t\tNextBlankLine,\n\n\t\tWrappedLineStart,\n\t\tWrappedLineFirstNonWhitespaceCharacter,\n\t\tWrappedLineColumnCenter,\n\t\tWrappedLineEnd,\n\t\tWrappedLineLastNonWhitespaceCharacter,\n\n\t\tViewPortTop,\n\t\tViewPortCenter,\n\t\tViewPortBottom,\n\n\t\tViewPortIfOutside,\n\t}\n\n\texport type SimpleMoveDirection = (\n\t\tDirection.Left\n\t\t| Direction.Right\n\t\t| Direction.Up\n\t\t| Direction.Down\n\t\t| Direction.PrevBlankLine\n\t\t| Direction.NextBlankLine\n\t\t| Direction.WrappedLineStart\n\t\t| Direction.WrappedLineFirstNonWhitespaceCharacter\n\t\t| Direction.WrappedLineColumnCenter\n\t\t| Direction.WrappedLineEnd\n\t\t| Direction.WrappedLineLastNonWhitespaceCharacter\n\t);\n\n\texport type ViewportDirection = (\n\t\tDirection.ViewPortTop\n\t\t| Direction.ViewPortCenter\n\t\t| Direction.ViewPortBottom\n\t\t| Direction.ViewPortIfOutside\n\t);\n\n\texport const enum Unit {\n\t\tNone,\n\t\tLine,\n\t\tWrappedLine,\n\t\tCharacter,\n\t\tHalfLine,\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/cursor/cursorMoveCommands.ts","vs/editor/common/cursor/cursorMoveCommands.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,WAAW,EAA8D,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAChI,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAa,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,kBAAkB;IAEvB,MAAM,CAAC,aAAa,CAAC,SAAqB,EAAE,OAAsB,EAAE,cAAuB;QACjG,MAAM,MAAM,GAAyB,EAAE,CAAC;QACxC,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;YACpD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;YAC3E,IAAI,cAAc,EAAE,CAAC;gBACpB,MA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AA2B,CAAC;gBACrC,MAAM;YACP,KAAK,WAAA,YAAY,CAAC,iBAAiB;gBAClC,SAAS,uCAA8B,CAAC;gBACxC,MAAM;YACP;gBACC,oBAAoB;gBACpB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,IAAI,oBAAY,CAAC;QACrB,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC;YACjB,KAAK,WAAA,OAAO,CAAC,IAAI;gBAChB,IAAI,oBAAY,CAAC;gBACjB,MAAM;YACP,KAAK,WAAA,OAAO,CAAC,WAAW;gBACvB,IAAI,2BAAmB,CAAC;gBACxB,MAAM;YACP,KAAK,WAAA,OAAO,CAAC,SAAS;gBACrB,IAAI,yBAAiB,CAAC;gBACtB,MAAM;YACP,KAAK,WAAA,OAAO,CAAC,QAAQ;gBACpB,IAAI,wBAAgB,CAAC;gBACrB,MAAM;QACR,CAAC;QAED,OAAO;YACN,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YACxB,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;SAC7B,CAAC;IACH,CAAC;IAjFe,gBAAK,QAiFpB,CAAA;AAmEF,CAAC,EAtRgB,UAAU,KAAV,UAAU,QAsR1B","file":"cursorMoveCommands.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as types from '../../../base/common/types.js';\nimport { CursorState, ICursorSimpleModel, PartialCursorState, SelectionStartKind, SingleCursorState } from '../cursorCommon.js';\nimport { MoveOperations } from './cursorMoveOperations.js';\nimport { WordOperations } from './cursorWordOperations.js';\nimport { IPosition, Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { ICommandMetadata } from '../../../platform/commands/common/commands.js';\nimport { IViewModel } from '../viewModel.js';\nimport { TextDirection } from '../model.js';\n\nexport class CursorMoveCommands {\n\n\tpublic static addCursorDown(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static addCursorUp(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineStart(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\tconst currentViewStateColumn = cursor.viewState.position.column;\n\t\tconst currentModelStateColumn = cursor.modelState.position.column;\n\t\tconst isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\n\n\t\tconst currentViewStatelineNumber = cursor.viewState.position.lineNumber;\n\t\tconst firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\n\t\tconst isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\n\n\t\tif (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\n\t\t\treturn this._moveToLineStartByView(viewModel, cursor, inSelectionMode);\n\t\t} else {\n\t\t\treturn this._moveToLineStartByModel(viewModel, cursor, inSelectionMode);\n\t\t}\n\t}\n\n\tprivate static _moveToLineStartByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)\n\t\t);\n\t}\n\n\tprivate static _moveToLineStartByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)\n\t\t);\n\t}\n\n\tpublic static moveToEndOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, sticky: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineEnd(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\tconst viewStatePosition = cursor.viewState.position;\n\t\tconst viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\n\t\tconst isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\n\n\t\tconst modelStatePosition = cursor.modelState.position;\n\t\tconst modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber);\n\t\tconst isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\n\n\t\tif (isEndOfViewLine || isEndLineOfWrappedLine) {\n\t\t\treturn this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky);\n\t\t} else {\n\t\t\treturn this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\t}\n\n\tprivate static _moveToLineEndByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tprivate static _moveToLineEndByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tpublic static expandLineSelection(viewModel: IViewModel, cursors: CursorState[]): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\n\t\t\tconst startLineNumber = cursor.modelState.selection.startLineNumber;\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet endLineNumber = cursor.modelState.selection.endLineNumber;\n\t\t\tlet endColumn: number;\n\t\t\tif (endLineNumber === lineCount) {\n\t\t\t\tendColumn = viewModel.model.getLineMaxColumn(lineCount);\n\t\t\t} else {\n\t\t\t\tendLineNumber++;\n\t\t\t\tendColumn = 1;\n\t\t\t}\n\n\t\t\tresult[i] = CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(startLineNumber, 1, startLineNumber, 1), SelectionStartKind.Simple, 0,\n\t\t\t\tnew Position(endLineNumber, endColumn), 0\n\t\t\t));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToEndOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static selectAll(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tconst lineCount = viewModel.model.getLineCount();\n\t\tconst maxColumn = viewModel.model.getLineMaxColumn(lineCount);\n\n\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\tnew Range(1, 1, 1, 1), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineCount, maxColumn), 0\n\t\t));\n\t}\n\n\tpublic static line(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\n\t\tif (!inSelectionMode) {\n\t\t\t// Entering line selection for the first time\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet selectToLineNumber = position.lineNumber + 1;\n\t\t\tlet selectToColumn = 1;\n\t\t\tif (selectToLineNumber > lineCount) {\n\t\t\t\tselectToLineNumber = lineCount;\n\t\t\t\tselectToColumn = viewModel.model.getLineMaxColumn(selectToLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(position.lineNumber, 1, selectToLineNumber, selectToColumn), SelectionStartKind.Line, 0,\n\t\t\t\tnew Position(selectToLineNumber, selectToColumn), 0\n\t\t\t));\n\t\t}\n\n\t\t// Continuing line selection\n\t\tconst enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\n\n\t\tif (position.lineNumber < enteringLineNumber) {\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, viewPosition.lineNumber, 1, 0\n\t\t\t));\n\n\t\t} else if (position.lineNumber > enteringLineNumber) {\n\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToViewLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToViewColumn = 1;\n\t\t\tif (selectToViewLineNumber > lineCount) {\n\t\t\t\tselectToViewLineNumber = lineCount;\n\t\t\t\tselectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, selectToViewLineNumber, selectToViewColumn, 0\n\t\t\t));\n\n\t\t} else {\n\n\t\t\tconst endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\n\t\t\treturn CursorState.fromModelState(cursor.modelState.move(\n\t\t\t\ttrue, endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0\n\t\t\t));\n\n\t\t}\n\t}\n\n\tpublic static word(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\treturn CursorState.fromModelState(WordOperations.word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position));\n\t}\n\n\tpublic static cancelSelection(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tif (!cursor.modelState.hasSelection()) {\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\t\t}\n\n\t\tconst lineNumber = cursor.viewState.position.lineNumber;\n\t\tconst column = cursor.viewState.position.column;\n\n\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\tnew Range(lineNumber, column, lineNumber, column), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineNumber, column), 0\n\t\t));\n\t}\n\n\tpublic static moveTo(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tif (inSelectionMode) {\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Word) {\n\t\t\t\treturn this.word(viewModel, cursor, inSelectionMode, _position);\n\t\t\t}\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Line) {\n\t\t\t\treturn this.line(viewModel, cursor, inSelectionMode, _position, _viewPosition);\n\t\t\t}\n\t\t}\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\n\t}\n\n\tpublic static simpleMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.SimpleMoveDirection, inSelectionMode: boolean, value: number, unit: CursorMove.Unit): PartialCursorState[] | null {\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.Left: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move left by half the current line length\n\t\t\t\t\treturn this._moveHalfLineLeft(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move left by `moveParams.value` columns\n\t\t\t\t\treturn this._moveLeft(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Right: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move right by half the current line length\n\t\t\t\t\treturn this._moveHalfLineRight(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move right by `moveParams.value` columns\n\t\t\t\t\treturn this._moveRight(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Up: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move up by view lines\n\t\t\t\t\treturn this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move up by model lines\n\t\t\t\t\treturn this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Down: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move down by view lines\n\t\t\t\t\treturn this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move down by model lines\n\t\t\t\t\treturn this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.PrevBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.NextBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineStart: {\n\t\t\t\t// Move to the beginning of the current view line\n\t\t\t\treturn this._moveToViewMinColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineFirstNonWhitespaceCharacter: {\n\t\t\t\t// Move to the first non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineColumnCenter: {\n\t\t\t\t// Move to the \"center\" of the current view line\n\t\t\t\treturn this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineEnd: {\n\t\t\t\t// Move to the end of the current view line\n\t\t\t\treturn this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineLastNonWhitespaceCharacter: {\n\t\t\t\t// Move to the last non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\n\t}\n\n\tpublic static viewportMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.ViewportDirection, inSelectionMode: boolean, value: number): PartialCursorState[] | null {\n\t\tconst visibleViewRange = viewModel.getCompletelyVisibleViewRange();\n\t\tconst visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.ViewPortTop: {\n\t\t\t\t// Move to the nth line start in the viewport (from the top)\n\t\t\t\tconst modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortBottom: {\n\t\t\t\t// Move to the nth line start in the viewport (from the bottom)\n\t\t\t\tconst modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortCenter: {\n\t\t\t\t// Move to the line start in the viewport center\n\t\t\t\tconst modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortIfOutside: {\n\t\t\t\t// Move to a position inside the viewport\n\t\t\t\tconst result: PartialCursorState[] = [];\n\t\t\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\t\t\tconst cursor = cursors[i];\n\t\t\t\t\tresult[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic static findPositionInViewportIfOutside(viewModel: IViewModel, cursor: CursorState, visibleViewRange: Range, inSelectionMode: boolean): PartialCursorState {\n\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\n\t\tif (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\n\t\t\t// Nothing to do, cursor is in viewport\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\n\t\t} else {\n\t\t\tlet newViewLineNumber: number;\n\t\t\tif (viewLineNumber > visibleViewRange.endLineNumber - 1) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.endLineNumber - 1;\n\t\t\t} else if (viewLineNumber < visibleViewRange.startLineNumber) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.startLineNumber;\n\t\t\t} else {\n\t\t\t\tnewViewLineNumber = viewLineNumber;\n\t\t\t}\n\t\t\tconst position = MoveOperations.vertical(viewModel.cursorConfig, viewModel, viewLineNumber, cursor.viewState.position.column, cursor.viewState.leftoverVisibleColumns, newViewLineNumber, false);\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, position.lineNumber, position.column, position.leftoverVisibleColumns));\n\t\t}\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the start).\n\t */\n\tprivate static _firstLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.min(range.endLineNumber, startLineNumber + count - 1);\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the end).\n\t */\n\tprivate static _lastLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.max(startLineNumber, range.endLineNumber - count + 1);\n\t}\n\n\tprivate static _moveLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toViewLineNumber: number, toViewColumn: number): PartialCursorState {\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\n\t}\n\n\tprivate static _moveToModelPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toModelLineNumber: number, toModelColumn: number): PartialCursorState {\n\t\treturn CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\n\t}\n\n\tprivate static _moveToViewMinColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMinColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewFirstNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewCenterColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewMaxColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMaxColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewLastNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport namespace CursorMove {\n\n\tconst isCursorMoveArgs = function (arg: unknown): boolean {\n\t\tif (!types.isObject(arg)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst cursorMoveArg: RawArguments = arg as RawArguments;\n\n\t\tif (!types.isString(cursorMoveArg.to)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.select) && !types.isBoolean(cursorMoveArg.select)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.by) && !types.isString(cursorMoveArg.by)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.value) && !types.isNumber(cursorMoveArg.value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.noHistory) && !types.isBoolean(cursorMoveArg.noHistory)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\texport const metadata: ICommandMetadata = {\n\t\tdescription: 'Move cursor to a logical position in the view',\n\t\targs: [\n\t\t\t{\n\t\t\t\tname: 'Cursor move argument object',\n\t\t\t\tdescription: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t\t* 'noHistory': If 'true' does not add the movement to navigation history. Default is 'false'.\n\t\t\t\t`,\n\t\t\t\tconstraint: isCursorMoveArgs,\n\t\t\t\tschema: {\n\t\t\t\t\t'type': 'object',\n\t\t\t\t\t'required': ['to'],\n\t\t\t\t\t'properties': {\n\t\t\t\t\t\t'to': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'by': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['line', 'wrappedLine', 'character', 'halfLine']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'value': {\n\t\t\t\t\t\t\t'type': 'number',\n\t\t\t\t\t\t\t'default': 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'select': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'noHistory': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t};\n\n\t/**\n\t * Positions in the view for cursor move command.\n\t */\n\texport const RawDirection = {\n\t\tLeft: 'left',\n\t\tRight: 'right',\n\t\tUp: 'up',\n\t\tDown: 'down',\n\n\t\tPrevBlankLine: 'prevBlankLine',\n\t\tNextBlankLine: 'nextBlankLine',\n\n\t\tWrappedLineStart: 'wrappedLineStart',\n\t\tWrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\n\t\tWrappedLineColumnCenter: 'wrappedLineColumnCenter',\n\t\tWrappedLineEnd: 'wrappedLineEnd',\n\t\tWrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\n\n\t\tViewPortTop: 'viewPortTop',\n\t\tViewPortCenter: 'viewPortCenter',\n\t\tViewPortBottom: 'viewPortBottom',\n\n\t\tViewPortIfOutside: 'viewPortIfOutside'\n\t};\n\n\t/**\n\t * Units for Cursor move 'by' argument\n\t */\n\texport const RawUnit = {\n\t\tLine: 'line',\n\t\tWrappedLine: 'wrappedLine',\n\t\tCharacter: 'character',\n\t\tHalfLine: 'halfLine'\n\t};\n\n\t/**\n\t * Arguments for Cursor move command\n\t */\n\texport interface RawArguments {\n\t\tto: string;\n\t\tselect?: boolean;\n\t\tby?: string;\n\t\tvalue?: number;\n\t\tnoHistory?: boolean;\n\t}\n\n\texport function parse(args: Partial<RawArguments>): ParsedArguments | null {\n\t\tif (!args.to) {\n\t\t\t// illegal arguments\n\t\t\treturn null;\n\t\t}\n\n\t\tlet direction: Direction;\n\t\tswitch (args.to) {\n\t\t\tcase RawDirection.Left:\n\t\t\t\tdirection = Direction.Left;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Right:\n\t\t\t\tdirection = Direction.Right;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Up:\n\t\t\t\tdirection = Direction.Up;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Down:\n\t\t\t\tdirection = Direction.Down;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.PrevBlankLine:\n\t\t\t\tdirection = Direction.PrevBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.NextBlankLine:\n\t\t\t\tdirection = Direction.NextBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineStart:\n\t\t\t\tdirection = Direction.WrappedLineStart;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineFirstNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineFirstNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineColumnCenter:\n\t\t\t\tdirection = Direction.WrappedLineColumnCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineEnd:\n\t\t\t\tdirection = Direction.WrappedLineEnd;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineLastNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineLastNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortTop:\n\t\t\t\tdirection = Direction.ViewPortTop;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortBottom:\n\t\t\t\tdirection = Direction.ViewPortBottom;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortCenter:\n\t\t\t\tdirection = Direction.ViewPortCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortIfOutside:\n\t\t\t\tdirection = Direction.ViewPortIfOutside;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// illegal arguments\n\t\t\t\treturn null;\n\t\t}\n\n\t\tlet unit = Unit.None;\n\t\tswitch (args.by) {\n\t\t\tcase RawUnit.Line:\n\t\t\t\tunit = Unit.Line;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.WrappedLine:\n\t\t\t\tunit = Unit.WrappedLine;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.Character:\n\t\t\t\tunit = Unit.Character;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.HalfLine:\n\t\t\t\tunit = Unit.HalfLine;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tdirection: direction,\n\t\t\tunit: unit,\n\t\t\tselect: (!!args.select),\n\t\t\tvalue: (args.value || 1),\n\t\t\tnoHistory: (!!args.noHistory)\n\t\t};\n\t}\n\n\texport interface ParsedArguments {\n\t\tdirection: Direction;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t\tnoHistory: boolean;\n\t}\n\n\texport interface SimpleMoveArguments {\n\t\tdirection: SimpleMoveDirection;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t}\n\n\texport const enum Direction {\n\t\tLeft,\n\t\tRight,\n\t\tUp,\n\t\tDown,\n\t\tPrevBlankLine,\n\t\tNextBlankLine,\n\n\t\tWrappedLineStart,\n\t\tWrappedLineFirstNonWhitespaceCharacter,\n\t\tWrappedLineColumnCenter,\n\t\tWrappedLineEnd,\n\t\tWrappedLineLastNonWhitespaceCharacter,\n\n\t\tViewPortTop,\n\t\tViewPortCenter,\n\t\tViewPortBottom,\n\n\t\tViewPortIfOutside,\n\t}\n\n\texport type SimpleMoveDirection = (\n\t\tDirection.Left\n\t\t| Direction.Right\n\t\t| Direction.Up\n\t\t| Direction.Down\n\t\t| Direction.PrevBlankLine\n\t\t| Direction.NextBlankLine\n\t\t| Direction.WrappedLineStart\n\t\t| Direction.WrappedLineFirstNonWhitespaceCharacter\n\t\t| Direction.WrappedLineColumnCenter\n\t\t| Direction.WrappedLineEnd\n\t\t| Direction.WrappedLineLastNonWhitespaceCharacter\n\t);\n\n\texport type ViewportDirection = (\n\t\tDirection.ViewPortTop\n\t\t| Direction.ViewPortCenter\n\t\t| Direction.ViewPortBottom\n\t\t| Direction.ViewPortIfOutside\n\t);\n\n\texport const enum Unit {\n\t\tNone,\n\t\tLine,\n\t\tWrappedLine,\n\t\tCharacter,\n\t\tHalfLine,\n\t}\n\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as types from '../../../base/common/types.js';\nimport { CursorState, ICursorSimpleModel, PartialCursorState, SelectionStartKind, SingleCursorState } from '../cursorCommon.js';\nimport { MoveOperations } from './cursorMoveOperations.js';\nimport { WordOperations } from './cursorWordOperations.js';\nimport { IPosition, Position } from '../core/position.js';\nimport { Range } from '../core/range.js';\nimport { ICommandMetadata } from '../../../platform/commands/common/commands.js';\nimport { IViewModel } from '../viewModel.js';\nimport { TextDirection } from '../model.js';\n\nexport class CursorMoveCommands {\n\n\tpublic static addCursorDown(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateDown(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static addCursorUp(viewModel: IViewModel, cursors: CursorState[], useLogicalLine: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tlet resultLen = 0;\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n\t\t\tif (useLogicalLine) {\n\t\t\t\tresult[resultLen++] = CursorState.fromModelState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState));\n\t\t\t} else {\n\t\t\t\tresult[resultLen++] = CursorState.fromViewState(MoveOperations.translateUp(viewModel.cursorConfig, viewModel, cursor.viewState));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineStart(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\tconst currentViewStateColumn = cursor.viewState.position.column;\n\t\tconst currentModelStateColumn = cursor.modelState.position.column;\n\t\tconst isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\n\n\t\tconst currentViewStatelineNumber = cursor.viewState.position.lineNumber;\n\t\tconst firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\n\t\tconst isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\n\n\t\tif (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\n\t\t\treturn this._moveToLineStartByView(viewModel, cursor, inSelectionMode);\n\t\t} else {\n\t\t\treturn this._moveToLineStartByModel(viewModel, cursor, inSelectionMode);\n\t\t}\n\t}\n\n\tprivate static _moveToLineStartByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)\n\t\t);\n\t}\n\n\tprivate static _moveToLineStartByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)\n\t\t);\n\t}\n\n\tpublic static moveToEndOfLine(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, sticky: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate static _moveToLineEnd(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\tconst viewStatePosition = cursor.viewState.position;\n\t\tconst viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\n\t\tconst isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\n\n\t\tconst modelStatePosition = cursor.modelState.position;\n\t\tconst modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber);\n\t\tconst isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\n\n\t\tif (isEndOfViewLine || isEndLineOfWrappedLine) {\n\t\t\treturn this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky);\n\t\t} else {\n\t\t\treturn this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky);\n\t\t}\n\t}\n\n\tprivate static _moveToLineEndByView(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromViewState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tprivate static _moveToLineEndByModel(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, sticky: boolean): PartialCursorState {\n\t\treturn CursorState.fromModelState(\n\t\t\tMoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky)\n\t\t);\n\t}\n\n\tpublic static expandLineSelection(viewModel: IViewModel, cursors: CursorState[]): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\n\t\t\tconst startLineNumber = cursor.modelState.selection.startLineNumber;\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet endLineNumber = cursor.modelState.selection.endLineNumber;\n\t\t\tlet endColumn: number;\n\t\t\tif (endLineNumber === lineCount) {\n\t\t\t\tendColumn = viewModel.model.getLineMaxColumn(lineCount);\n\t\t\t} else {\n\t\t\t\tendLineNumber++;\n\t\t\t\tendColumn = 1;\n\t\t\t}\n\n\t\t\tresult[i] = CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(startLineNumber, 1, startLineNumber, 1), SelectionStartKind.Simple, 0,\n\t\t\t\tnew Position(endLineNumber, endColumn), 0\n\t\t\t));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToBeginningOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static moveToEndOfBuffer(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static selectAll(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tconst lineCount = viewModel.model.getLineCount();\n\t\tconst maxColumn = viewModel.model.getLineMaxColumn(lineCount);\n\n\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\tnew Range(1, 1, 1, 1), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineCount, maxColumn), 0\n\t\t));\n\t}\n\n\tpublic static line(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\n\t\tif (!inSelectionMode) {\n\t\t\t// Entering line selection for the first time\n\t\t\tconst lineCount = viewModel.model.getLineCount();\n\n\t\t\tlet selectToLineNumber = position.lineNumber + 1;\n\t\t\tlet selectToColumn = 1;\n\t\t\tif (selectToLineNumber > lineCount) {\n\t\t\t\tselectToLineNumber = lineCount;\n\t\t\t\tselectToColumn = viewModel.model.getLineMaxColumn(selectToLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromModelState(new SingleCursorState(\n\t\t\t\tnew Range(position.lineNumber, 1, selectToLineNumber, selectToColumn), SelectionStartKind.Line, 0,\n\t\t\t\tnew Position(selectToLineNumber, selectToColumn), 0\n\t\t\t));\n\t\t}\n\n\t\t// Continuing line selection\n\t\tconst enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\n\n\t\tif (position.lineNumber < enteringLineNumber) {\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, viewPosition.lineNumber, 1, 0\n\t\t\t));\n\n\t\t} else if (position.lineNumber > enteringLineNumber) {\n\n\t\t\tconst lineCount = viewModel.getLineCount();\n\n\t\t\tlet selectToViewLineNumber = viewPosition.lineNumber + 1;\n\t\t\tlet selectToViewColumn = 1;\n\t\t\tif (selectToViewLineNumber > lineCount) {\n\t\t\t\tselectToViewLineNumber = lineCount;\n\t\t\t\tselectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber);\n\t\t\t}\n\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(\n\t\t\t\ttrue, selectToViewLineNumber, selectToViewColumn, 0\n\t\t\t));\n\n\t\t} else {\n\n\t\t\tconst endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\n\t\t\treturn CursorState.fromModelState(cursor.modelState.move(\n\t\t\t\ttrue, endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0\n\t\t\t));\n\n\t\t}\n\t}\n\n\tpublic static word(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition): PartialCursorState {\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\treturn CursorState.fromModelState(WordOperations.word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position));\n\t}\n\n\tpublic static cancelSelection(viewModel: IViewModel, cursor: CursorState): PartialCursorState {\n\t\tif (!cursor.modelState.hasSelection()) {\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\t\t}\n\n\t\tconst lineNumber = cursor.viewState.position.lineNumber;\n\t\tconst column = cursor.viewState.position.column;\n\n\t\treturn CursorState.fromViewState(new SingleCursorState(\n\t\t\tnew Range(lineNumber, column, lineNumber, column), SelectionStartKind.Simple, 0,\n\t\t\tnew Position(lineNumber, column), 0\n\t\t));\n\t}\n\n\tpublic static moveTo(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, _position: IPosition, _viewPosition: IPosition | undefined): PartialCursorState {\n\t\tif (inSelectionMode) {\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Word) {\n\t\t\t\treturn this.word(viewModel, cursor, inSelectionMode, _position);\n\t\t\t}\n\t\t\tif (cursor.modelState.selectionStartKind === SelectionStartKind.Line) {\n\t\t\t\treturn this.line(viewModel, cursor, inSelectionMode, _position, _viewPosition);\n\t\t\t}\n\t\t}\n\t\tconst position = viewModel.model.validatePosition(_position);\n\t\tconst viewPosition = (\n\t\t\t_viewPosition\n\t\t\t\t? viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n\t\t\t\t: viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)\n\t\t);\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\n\t}\n\n\tpublic static simpleMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.SimpleMoveDirection, inSelectionMode: boolean, value: number, unit: CursorMove.Unit): PartialCursorState[] | null {\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.Left: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move left by half the current line length\n\t\t\t\t\treturn this._moveHalfLineLeft(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move left by `moveParams.value` columns\n\t\t\t\t\treturn this._moveLeft(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Right: {\n\t\t\t\tif (unit === CursorMove.Unit.HalfLine) {\n\t\t\t\t\t// Move right by half the current line length\n\t\t\t\t\treturn this._moveHalfLineRight(viewModel, cursors, inSelectionMode);\n\t\t\t\t} else {\n\t\t\t\t\t// Move right by `moveParams.value` columns\n\t\t\t\t\treturn this._moveRight(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Up: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move up by view lines\n\t\t\t\t\treturn this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move up by model lines\n\t\t\t\t\treturn this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.Down: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\t// Move down by view lines\n\t\t\t\t\treturn this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t} else {\n\t\t\t\t\t// Move down by model lines\n\t\t\t\t\treturn this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.PrevBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.NextBlankLine: {\n\t\t\t\tif (unit === CursorMove.Unit.WrappedLine) {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromViewState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\n\t\t\t\t} else {\n\t\t\t\t\treturn cursors.map(cursor => CursorState.fromModelState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineStart: {\n\t\t\t\t// Move to the beginning of the current view line\n\t\t\t\treturn this._moveToViewMinColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineFirstNonWhitespaceCharacter: {\n\t\t\t\t// Move to the first non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineColumnCenter: {\n\t\t\t\t// Move to the \"center\" of the current view line\n\t\t\t\treturn this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineEnd: {\n\t\t\t\t// Move to the end of the current view line\n\t\t\t\treturn this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tcase CursorMove.Direction.WrappedLineLastNonWhitespaceCharacter: {\n\t\t\t\t// Move to the last non-whitespace column of the current view line\n\t\t\t\treturn this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\n\t}\n\n\tpublic static viewportMove(viewModel: IViewModel, cursors: CursorState[], direction: CursorMove.ViewportDirection, inSelectionMode: boolean, value: number): PartialCursorState[] | null {\n\t\tconst visibleViewRange = viewModel.getCompletelyVisibleViewRange();\n\t\tconst visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\n\t\tswitch (direction) {\n\t\t\tcase CursorMove.Direction.ViewPortTop: {\n\t\t\t\t// Move to the nth line start in the viewport (from the top)\n\t\t\t\tconst modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortBottom: {\n\t\t\t\t// Move to the nth line start in the viewport (from the bottom)\n\t\t\t\tconst modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortCenter: {\n\t\t\t\t// Move to the line start in the viewport center\n\t\t\t\tconst modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\n\t\t\t\tconst modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n\t\t\t\treturn [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\n\t\t\t}\n\t\t\tcase CursorMove.Direction.ViewPortIfOutside: {\n\t\t\t\t// Move to a position inside the viewport\n\t\t\t\tconst result: PartialCursorState[] = [];\n\t\t\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\t\t\tconst cursor = cursors[i];\n\t\t\t\t\tresult[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic static findPositionInViewportIfOutside(viewModel: IViewModel, cursor: CursorState, visibleViewRange: Range, inSelectionMode: boolean): PartialCursorState {\n\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\n\t\tif (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\n\t\t\t// Nothing to do, cursor is in viewport\n\t\t\treturn new CursorState(cursor.modelState, cursor.viewState);\n\n\t\t} else {\n\t\t\tlet newViewLineNumber: number;\n\t\t\tif (viewLineNumber > visibleViewRange.endLineNumber - 1) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.endLineNumber - 1;\n\t\t\t} else if (viewLineNumber < visibleViewRange.startLineNumber) {\n\t\t\t\tnewViewLineNumber = visibleViewRange.startLineNumber;\n\t\t\t} else {\n\t\t\t\tnewViewLineNumber = viewLineNumber;\n\t\t\t}\n\t\t\tconst position = MoveOperations.vertical(viewModel.cursorConfig, viewModel, viewLineNumber, cursor.viewState.position.column, cursor.viewState.leftoverVisibleColumns, newViewLineNumber, false);\n\t\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, position.lineNumber, position.column, position.leftoverVisibleColumns));\n\t\t}\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the start).\n\t */\n\tprivate static _firstLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.min(range.endLineNumber, startLineNumber + count - 1);\n\t}\n\n\t/**\n\t * Find the nth line start included in the range (from the end).\n\t */\n\tprivate static _lastLineNumberInRange(model: ICursorSimpleModel, range: Range, count: number): number {\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tif (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n\t\t\t// Move on to the second line if the first line start is not included in the range\n\t\t\tstartLineNumber++;\n\t\t}\n\n\t\treturn Math.max(startLineNumber, range.endLineNumber - count + 1);\n\t}\n\n\tprivate static _moveLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineLeft(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, noOfColumns: number): PartialCursorState[] {\n\t\treturn cursors.map(cursor => {\n\t\t\tconst direction = viewModel.getTextDirection(cursor.viewState.position.lineNumber);\n\t\t\tconst isRtl = direction === TextDirection.RTL;\n\n\t\t\treturn CursorState.fromViewState(\n\t\t\t\tisRtl\n\t\t\t\t\t? MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t\t\t: MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns)\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate static _moveHalfLineRight(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst halfLine = Math.round(viewModel.getLineLength(viewLineNumber) / 2);\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveDownByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByViewLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromViewState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveUpByModelLines(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean, linesCount: number): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tresult[i] = CursorState.fromModelState(MoveOperations.moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toViewLineNumber: number, toViewColumn: number): PartialCursorState {\n\t\treturn CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\n\t}\n\n\tprivate static _moveToModelPosition(viewModel: IViewModel, cursor: CursorState, inSelectionMode: boolean, toModelLineNumber: number, toModelColumn: number): PartialCursorState {\n\t\treturn CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\n\t}\n\n\tprivate static _moveToViewMinColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMinColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewFirstNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewCenterColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewMaxColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineMaxColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _moveToViewLastNonWhitespaceColumn(viewModel: IViewModel, cursors: CursorState[], inSelectionMode: boolean): PartialCursorState[] {\n\t\tconst result: PartialCursorState[] = [];\n\t\tfor (let i = 0, len = cursors.length; i < len; i++) {\n\t\t\tconst cursor = cursors[i];\n\t\t\tconst viewLineNumber = cursor.viewState.position.lineNumber;\n\t\t\tconst viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\n\t\t\tresult[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\n\t\t}\n\t\treturn result;\n\t}\n}\n\nexport namespace CursorMove {\n\n\tconst isCursorMoveArgs = function (arg: unknown): boolean {\n\t\tif (!types.isObject(arg)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst cursorMoveArg: RawArguments = arg as RawArguments;\n\n\t\tif (!types.isString(cursorMoveArg.to)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.select) && !types.isBoolean(cursorMoveArg.select)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.by) && !types.isString(cursorMoveArg.by)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.value) && !types.isNumber(cursorMoveArg.value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!types.isUndefined(cursorMoveArg.noHistory) && !types.isBoolean(cursorMoveArg.noHistory)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\texport const metadata: ICommandMetadata = {\n\t\tdescription: 'Move cursor to a logical position in the view',\n\t\targs: [\n\t\t\t{\n\t\t\t\tname: 'Cursor move argument object',\n\t\t\t\tdescription: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t\t* 'noHistory': If 'true' does not add the movement to navigation history. Default is 'false'.\n\t\t\t\t`,\n\t\t\t\tconstraint: isCursorMoveArgs,\n\t\t\t\tschema: {\n\t\t\t\t\t'type': 'object',\n\t\t\t\t\t'required': ['to'],\n\t\t\t\t\t'properties': {\n\t\t\t\t\t\t'to': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'by': {\n\t\t\t\t\t\t\t'type': 'string',\n\t\t\t\t\t\t\t'enum': ['line', 'wrappedLine', 'character', 'halfLine']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'value': {\n\t\t\t\t\t\t\t'type': 'number',\n\t\t\t\t\t\t\t'default': 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'select': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'noHistory': {\n\t\t\t\t\t\t\t'type': 'boolean',\n\t\t\t\t\t\t\t'default': false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t};\n\n\t/**\n\t * Positions in the view for cursor move command.\n\t */\n\texport const RawDirection = {\n\t\tLeft: 'left',\n\t\tRight: 'right',\n\t\tUp: 'up',\n\t\tDown: 'down',\n\n\t\tPrevBlankLine: 'prevBlankLine',\n\t\tNextBlankLine: 'nextBlankLine',\n\n\t\tWrappedLineStart: 'wrappedLineStart',\n\t\tWrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\n\t\tWrappedLineColumnCenter: 'wrappedLineColumnCenter',\n\t\tWrappedLineEnd: 'wrappedLineEnd',\n\t\tWrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\n\n\t\tViewPortTop: 'viewPortTop',\n\t\tViewPortCenter: 'viewPortCenter',\n\t\tViewPortBottom: 'viewPortBottom',\n\n\t\tViewPortIfOutside: 'viewPortIfOutside'\n\t};\n\n\t/**\n\t * Units for Cursor move 'by' argument\n\t */\n\texport const RawUnit = {\n\t\tLine: 'line',\n\t\tWrappedLine: 'wrappedLine',\n\t\tCharacter: 'character',\n\t\tHalfLine: 'halfLine'\n\t};\n\n\t/**\n\t * Arguments for Cursor move command\n\t */\n\texport interface RawArguments {\n\t\tto: string;\n\t\tselect?: boolean;\n\t\tby?: string;\n\t\tvalue?: number;\n\t\tnoHistory?: boolean;\n\t}\n\n\texport function parse(args: Partial<RawArguments>): ParsedArguments | null {\n\t\tif (!args.to) {\n\t\t\t// illegal arguments\n\t\t\treturn null;\n\t\t}\n\n\t\tlet direction: Direction;\n\t\tswitch (args.to) {\n\t\t\tcase RawDirection.Left:\n\t\t\t\tdirection = Direction.Left;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Right:\n\t\t\t\tdirection = Direction.Right;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Up:\n\t\t\t\tdirection = Direction.Up;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.Down:\n\t\t\t\tdirection = Direction.Down;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.PrevBlankLine:\n\t\t\t\tdirection = Direction.PrevBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.NextBlankLine:\n\t\t\t\tdirection = Direction.NextBlankLine;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineStart:\n\t\t\t\tdirection = Direction.WrappedLineStart;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineFirstNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineFirstNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineColumnCenter:\n\t\t\t\tdirection = Direction.WrappedLineColumnCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineEnd:\n\t\t\t\tdirection = Direction.WrappedLineEnd;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.WrappedLineLastNonWhitespaceCharacter:\n\t\t\t\tdirection = Direction.WrappedLineLastNonWhitespaceCharacter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortTop:\n\t\t\t\tdirection = Direction.ViewPortTop;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortBottom:\n\t\t\t\tdirection = Direction.ViewPortBottom;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortCenter:\n\t\t\t\tdirection = Direction.ViewPortCenter;\n\t\t\t\tbreak;\n\t\t\tcase RawDirection.ViewPortIfOutside:\n\t\t\t\tdirection = Direction.ViewPortIfOutside;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// illegal arguments\n\t\t\t\treturn null;\n\t\t}\n\n\t\tlet unit = Unit.None;\n\t\tswitch (args.by) {\n\t\t\tcase RawUnit.Line:\n\t\t\t\tunit = Unit.Line;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.WrappedLine:\n\t\t\t\tunit = Unit.WrappedLine;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.Character:\n\t\t\t\tunit = Unit.Character;\n\t\t\t\tbreak;\n\t\t\tcase RawUnit.HalfLine:\n\t\t\t\tunit = Unit.HalfLine;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tdirection: direction,\n\t\t\tunit: unit,\n\t\t\tselect: (!!args.select),\n\t\t\tvalue: (args.value || 1),\n\t\t\tnoHistory: (!!args.noHistory)\n\t\t};\n\t}\n\n\texport interface ParsedArguments {\n\t\tdirection: Direction;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t\tnoHistory: boolean;\n\t}\n\n\texport interface SimpleMoveArguments {\n\t\tdirection: SimpleMoveDirection;\n\t\tunit: Unit;\n\t\tselect: boolean;\n\t\tvalue: number;\n\t}\n\n\texport const enum Direction {\n\t\tLeft,\n\t\tRight,\n\t\tUp,\n\t\tDown,\n\t\tPrevBlankLine,\n\t\tNextBlankLine,\n\n\t\tWrappedLineStart,\n\t\tWrappedLineFirstNonWhitespaceCharacter,\n\t\tWrappedLineColumnCenter,\n\t\tWrappedLineEnd,\n\t\tWrappedLineLastNonWhitespaceCharacter,\n\n\t\tViewPortTop,\n\t\tViewPortCenter,\n\t\tViewPortBottom,\n\n\t\tViewPortIfOutside,\n\t}\n\n\texport type SimpleMoveDirection = (\n\t\tDirection.Left\n\t\t| Direction.Right\n\t\t| Direction.Up\n\t\t| Direction.Down\n\t\t| Direction.PrevBlankLine\n\t\t| Direction.NextBlankLine\n\t\t| Direction.WrappedLineStart\n\t\t| Direction.WrappedLineFirstNonWhitespaceCharacter\n\t\t| Direction.WrappedLineColumnCenter\n\t\t| Direction.WrappedLineEnd\n\t\t| Direction.WrappedLineLastNonWhitespaceCharacter\n\t);\n\n\texport type ViewportDirection = (\n\t\tDirection.ViewPortTop\n\t\t| Direction.ViewPortCenter\n\t\t| Direction.ViewPortBottom\n\t\t| Direction.ViewPortIfOutside\n\t);\n\n\texport const enum Unit {\n\t\tNone,\n\t\tLine,\n\t\tWrappedLine,\n\t\tCharacter,\n\t\tHalfLine,\n\t}\n\n}\n"]}
|
|
@@ -365,7 +365,7 @@ export class WordOperations {
|
|
|
365
365
|
}
|
|
366
366
|
return new Range(lineNumber, column, position.lineNumber, position.column);
|
|
367
367
|
}
|
|
368
|
-
static deleteInsideWord(wordSeparators, model, selection) {
|
|
368
|
+
static deleteInsideWord(wordSeparators, model, selection, onlyWord = false) {
|
|
369
369
|
if (!selection.isEmpty()) {
|
|
370
370
|
return selection;
|
|
371
371
|
}
|
|
@@ -374,7 +374,7 @@ export class WordOperations {
|
|
|
374
374
|
if (r) {
|
|
375
375
|
return r;
|
|
376
376
|
}
|
|
377
|
-
return this._deleteInsideWordDetermineDeleteRange(wordSeparators, model, position);
|
|
377
|
+
return this._deleteInsideWordDetermineDeleteRange(wordSeparators, model, position, onlyWord);
|
|
378
378
|
}
|
|
379
379
|
static _charAtIsWhitespace(str, index) {
|
|
380
380
|
const charCode = str.charCodeAt(index);
|
|
@@ -407,7 +407,7 @@ export class WordOperations {
|
|
|
407
407
|
}
|
|
408
408
|
return new Range(position.lineNumber, leftIndex + 1, position.lineNumber, rightIndex + 2);
|
|
409
409
|
}
|
|
410
|
-
static _deleteInsideWordDetermineDeleteRange(wordSeparators, model, position) {
|
|
410
|
+
static _deleteInsideWordDetermineDeleteRange(wordSeparators, model, position, onlyWord) {
|
|
411
411
|
const lineContent = model.getLineContent(position.lineNumber);
|
|
412
412
|
const lineLength = lineContent.length;
|
|
413
413
|
if (lineLength === 0) {
|
|
@@ -436,6 +436,9 @@ export class WordOperations {
|
|
|
436
436
|
const deleteWordAndAdjacentWhitespace = (word) => {
|
|
437
437
|
let startColumn = word.start + 1;
|
|
438
438
|
let endColumn = word.end + 1;
|
|
439
|
+
if (onlyWord) {
|
|
440
|
+
return createRangeWithPosition(startColumn, endColumn);
|
|
441
|
+
}
|
|
439
442
|
let expandedToTheRight = false;
|
|
440
443
|
while (endColumn - 1 < lineLength && this._charAtIsWhitespace(lineContent, endColumn - 1)) {
|
|
441
444
|
expandedToTheRight = true;
|