@lvce-editor/editor-worker 5.9.0 → 5.11.0
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/dist/editorWorkerMain.js +435 -33
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -465,14 +465,14 @@ const getSelectionPairs = (selections, i) => {
|
|
|
465
465
|
|
|
466
466
|
const EmptyString$1 = '';
|
|
467
467
|
const NewLine$4 = '\n';
|
|
468
|
-
const Space$
|
|
469
|
-
const Tab = '\t';
|
|
468
|
+
const Space$2 = ' ';
|
|
469
|
+
const Tab$1 = '\t';
|
|
470
470
|
const DoubleQuote$1 = '"';
|
|
471
471
|
|
|
472
472
|
const getTabCount = string => {
|
|
473
473
|
let count = 0;
|
|
474
474
|
for (const element of string) {
|
|
475
|
-
if (element === Tab) {
|
|
475
|
+
if (element === Tab$1) {
|
|
476
476
|
count++;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
@@ -547,12 +547,12 @@ const measureTextWidth = (text, fontWeight, fontSize, fontFamily, letterSpacing,
|
|
|
547
547
|
|
|
548
548
|
const normalizeText = (text, normalize, tabSize) => {
|
|
549
549
|
if (normalize) {
|
|
550
|
-
return text.replaceAll(Tab, Space$
|
|
550
|
+
return text.replaceAll(Tab$1, Space$2.repeat(tabSize));
|
|
551
551
|
}
|
|
552
552
|
return text;
|
|
553
553
|
};
|
|
554
554
|
const shouldNormalizeText = text => {
|
|
555
|
-
return text.includes(Tab);
|
|
555
|
+
return text.includes(Tab$1);
|
|
556
556
|
};
|
|
557
557
|
|
|
558
558
|
const getX = (line, column, fontWeight, fontSize, fontFamily, isMonospaceFont, letterSpacing, tabSize, halfCursorWidth, width, averageCharWidth, difference = 0) => {
|
|
@@ -1714,13 +1714,13 @@ const EditorCompletion = 9;
|
|
|
1714
1714
|
const Empty = 0;
|
|
1715
1715
|
const FindWidget = 16;
|
|
1716
1716
|
const FocusEditorHover = 51;
|
|
1717
|
-
const FocusEditorRename = 11;
|
|
1718
|
-
const FocusFindWidgetCloseButton = 48;
|
|
1719
|
-
const FocusFindWidgetNextMatchButton = 49;
|
|
1720
|
-
const FocusFindWidgetPreviousMatchButton = 50;
|
|
1721
|
-
const FocusFindWidgetReplace = 43;
|
|
1722
|
-
const FocusFindWidgetReplaceAllButton = 47;
|
|
1723
|
-
const FocusFindWidgetReplaceButton = 46;
|
|
1717
|
+
const FocusEditorRename$1 = 11;
|
|
1718
|
+
const FocusFindWidgetCloseButton$1 = 48;
|
|
1719
|
+
const FocusFindWidgetNextMatchButton$1 = 49;
|
|
1720
|
+
const FocusFindWidgetPreviousMatchButton$1 = 50;
|
|
1721
|
+
const FocusFindWidgetReplace$1 = 43;
|
|
1722
|
+
const FocusFindWidgetReplaceAllButton$1 = 47;
|
|
1723
|
+
const FocusFindWidgetReplaceButton$1 = 46;
|
|
1724
1724
|
const FocusFindWidgetToggleReplace = 42;
|
|
1725
1725
|
const SourceActions = 38;
|
|
1726
1726
|
const FocusCodeGenerator = 52;
|
|
@@ -2165,7 +2165,7 @@ const guessOffset = (eventX, averageCharWidth) => {
|
|
|
2165
2165
|
const normalizeGuess = (line, guess, tabSize) => {
|
|
2166
2166
|
let normalizedGuess = guess;
|
|
2167
2167
|
for (let i = 0; i < guess; i++) {
|
|
2168
|
-
if (line[i] === Tab) {
|
|
2168
|
+
if (line[i] === Tab$1) {
|
|
2169
2169
|
normalizedGuess -= tabSize - 1;
|
|
2170
2170
|
}
|
|
2171
2171
|
}
|
|
@@ -2763,6 +2763,409 @@ const copyLineDown = editor => {
|
|
|
2763
2763
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
2764
2764
|
};
|
|
2765
2765
|
|
|
2766
|
+
const Backspace = 1;
|
|
2767
|
+
const Tab = 2;
|
|
2768
|
+
const Enter = 3;
|
|
2769
|
+
const Escape = 8;
|
|
2770
|
+
const Space$1 = 9;
|
|
2771
|
+
const End = 255;
|
|
2772
|
+
const Home = 12;
|
|
2773
|
+
const LeftArrow = 13;
|
|
2774
|
+
const UpArrow = 14;
|
|
2775
|
+
const RightArrow = 15;
|
|
2776
|
+
const DownArrow = 16;
|
|
2777
|
+
const Delete = 18;
|
|
2778
|
+
const KeyA = 29;
|
|
2779
|
+
const KeyC = 31;
|
|
2780
|
+
const KeyD = 32;
|
|
2781
|
+
const KeyF = 34;
|
|
2782
|
+
const KeyH = 36;
|
|
2783
|
+
const KeyJ = 38;
|
|
2784
|
+
const KeyK = 39;
|
|
2785
|
+
const KeyL = 40;
|
|
2786
|
+
const KeyO = 43;
|
|
2787
|
+
const KeyV = 50;
|
|
2788
|
+
const KeyX = 52;
|
|
2789
|
+
const KeyZ = 54;
|
|
2790
|
+
const F2 = 58;
|
|
2791
|
+
const F3 = 59;
|
|
2792
|
+
const F4 = 60;
|
|
2793
|
+
const F12 = 68;
|
|
2794
|
+
const Period = 87;
|
|
2795
|
+
const Slash$1 = 88;
|
|
2796
|
+
const BracketLeft = 90;
|
|
2797
|
+
const BracketRight = 92;
|
|
2798
|
+
|
|
2799
|
+
const CtrlCmd = 1 << 11 >>> 0;
|
|
2800
|
+
const Shift = 1 << 10 >>> 0;
|
|
2801
|
+
const Alt$1 = 1 << 9 >>> 0;
|
|
2802
|
+
|
|
2803
|
+
const FocusEditor = 12;
|
|
2804
|
+
const FocusEditorCompletions = 9;
|
|
2805
|
+
const FocusEditorRename = 11;
|
|
2806
|
+
const FocusEditorText = 12;
|
|
2807
|
+
const FocusFindWidget = 16;
|
|
2808
|
+
const FocusSourceActions = 38;
|
|
2809
|
+
const FocusFindWidgetReplace = 43;
|
|
2810
|
+
const FocusFindWidgetReplaceButton = 46;
|
|
2811
|
+
const FocusFindWidgetReplaceAllButton = 47;
|
|
2812
|
+
const FocusFindWidgetCloseButton = 48;
|
|
2813
|
+
const FocusFindWidgetNextMatchButton = 49;
|
|
2814
|
+
const FocusFindWidgetPreviousMatchButton = 50;
|
|
2815
|
+
const FocusEditorCodeGenerator = 52;
|
|
2816
|
+
|
|
2817
|
+
const getKeyBindings = () => {
|
|
2818
|
+
return [{
|
|
2819
|
+
key: Escape,
|
|
2820
|
+
command: 'Editor.closeSourceAction',
|
|
2821
|
+
when: FocusSourceActions
|
|
2822
|
+
}, {
|
|
2823
|
+
key: DownArrow,
|
|
2824
|
+
command: 'EditorSourceActions.focusNext',
|
|
2825
|
+
when: FocusSourceActions
|
|
2826
|
+
}, {
|
|
2827
|
+
key: UpArrow,
|
|
2828
|
+
command: 'EditorSourceActions.focusPrevious',
|
|
2829
|
+
when: FocusSourceActions
|
|
2830
|
+
}, {
|
|
2831
|
+
key: Home,
|
|
2832
|
+
command: 'EditorSourceActions.focusFirst',
|
|
2833
|
+
when: FocusSourceActions
|
|
2834
|
+
}, {
|
|
2835
|
+
key: End,
|
|
2836
|
+
command: 'EditorSourceActions.focusLast',
|
|
2837
|
+
when: FocusSourceActions
|
|
2838
|
+
}, {
|
|
2839
|
+
key: Enter,
|
|
2840
|
+
command: 'EditorSourceActions.selectCurrent',
|
|
2841
|
+
when: FocusSourceActions
|
|
2842
|
+
}, {
|
|
2843
|
+
key: Enter,
|
|
2844
|
+
command: 'FindWidget.focusNext',
|
|
2845
|
+
when: FocusFindWidget
|
|
2846
|
+
}, {
|
|
2847
|
+
key: Shift | F4,
|
|
2848
|
+
command: 'FindWidget.focusPrevious',
|
|
2849
|
+
when: FocusFindWidget
|
|
2850
|
+
}, {
|
|
2851
|
+
key: F4,
|
|
2852
|
+
command: 'FindWidget.focusNext',
|
|
2853
|
+
when: FocusFindWidget
|
|
2854
|
+
}, {
|
|
2855
|
+
key: Shift | Tab,
|
|
2856
|
+
command: 'FindWidget.focusToggleReplace',
|
|
2857
|
+
when: FocusFindWidget
|
|
2858
|
+
}, {
|
|
2859
|
+
key: Tab,
|
|
2860
|
+
command: 'FindWidget.focusReplace',
|
|
2861
|
+
when: FocusFindWidget
|
|
2862
|
+
}, {
|
|
2863
|
+
key: Tab,
|
|
2864
|
+
command: 'FindWidget.focusPreviousMatchButton',
|
|
2865
|
+
when: FocusFindWidgetReplace
|
|
2866
|
+
}, {
|
|
2867
|
+
key: Alt$1 | CtrlCmd | Enter,
|
|
2868
|
+
command: 'FindWidget.replaceAll',
|
|
2869
|
+
when: FocusFindWidgetReplace
|
|
2870
|
+
}, {
|
|
2871
|
+
key: Tab,
|
|
2872
|
+
command: 'FindWidget.focusNextMatchButton',
|
|
2873
|
+
when: FocusFindWidgetPreviousMatchButton
|
|
2874
|
+
}, {
|
|
2875
|
+
key: Shift | Tab,
|
|
2876
|
+
command: 'FindWidget.focusReplace',
|
|
2877
|
+
when: FocusFindWidgetPreviousMatchButton
|
|
2878
|
+
}, {
|
|
2879
|
+
key: Shift | Tab,
|
|
2880
|
+
command: 'FindWidget.focusPreviousMatchButton',
|
|
2881
|
+
when: FocusFindWidgetNextMatchButton
|
|
2882
|
+
}, {
|
|
2883
|
+
key: Tab,
|
|
2884
|
+
command: 'FindWidget.focusCloseButton',
|
|
2885
|
+
when: FocusFindWidgetNextMatchButton
|
|
2886
|
+
}, {
|
|
2887
|
+
key: Shift | Tab,
|
|
2888
|
+
command: 'FindWidget.focusNextMatchButton',
|
|
2889
|
+
when: FocusFindWidgetCloseButton
|
|
2890
|
+
}, {
|
|
2891
|
+
key: Tab,
|
|
2892
|
+
command: 'FindWidget.focusReplaceButton',
|
|
2893
|
+
when: FocusFindWidgetCloseButton
|
|
2894
|
+
}, {
|
|
2895
|
+
key: Shift | Tab,
|
|
2896
|
+
command: 'FindWidget.focusFind',
|
|
2897
|
+
when: FocusFindWidgetReplace
|
|
2898
|
+
}, {
|
|
2899
|
+
key: Tab,
|
|
2900
|
+
command: 'FindWidget.focusReplaceAllButton',
|
|
2901
|
+
when: FocusFindWidgetReplaceButton
|
|
2902
|
+
}, {
|
|
2903
|
+
key: Shift | Tab,
|
|
2904
|
+
command: 'FindWidget.focusCloseButton',
|
|
2905
|
+
when: FocusFindWidgetReplaceButton
|
|
2906
|
+
}, {
|
|
2907
|
+
key: Shift | Tab,
|
|
2908
|
+
command: 'FindWidget.focusReplaceButton',
|
|
2909
|
+
when: FocusFindWidgetReplaceAllButton
|
|
2910
|
+
}, {
|
|
2911
|
+
key: DownArrow,
|
|
2912
|
+
command: 'EditorCompletion.focusNext',
|
|
2913
|
+
when: FocusEditorCompletions
|
|
2914
|
+
}, {
|
|
2915
|
+
key: UpArrow,
|
|
2916
|
+
command: 'EditorCompletion.focusPrevious',
|
|
2917
|
+
when: FocusEditorCompletions
|
|
2918
|
+
}, {
|
|
2919
|
+
key: Enter,
|
|
2920
|
+
command: 'EditorCompletion.selectCurrent',
|
|
2921
|
+
when: FocusEditorCompletions
|
|
2922
|
+
}, {
|
|
2923
|
+
key: Escape,
|
|
2924
|
+
command: 'Editor.closeCompletion',
|
|
2925
|
+
when: FocusEditorCompletions
|
|
2926
|
+
}, {
|
|
2927
|
+
key: End,
|
|
2928
|
+
command: 'EditorCompletion.focusLast',
|
|
2929
|
+
when: FocusEditorCompletions
|
|
2930
|
+
}, {
|
|
2931
|
+
key: Home,
|
|
2932
|
+
command: 'EditorCompletion.focusFirst',
|
|
2933
|
+
when: FocusEditorCompletions
|
|
2934
|
+
}, {
|
|
2935
|
+
key: CtrlCmd | Space$1,
|
|
2936
|
+
command: 'EditorCompletion.toggleDetails',
|
|
2937
|
+
when: FocusEditorCompletions
|
|
2938
|
+
}, {
|
|
2939
|
+
key: CtrlCmd | RightArrow,
|
|
2940
|
+
command: 'Editor.cursorWordRight',
|
|
2941
|
+
when: FocusEditorText
|
|
2942
|
+
}, {
|
|
2943
|
+
key: CtrlCmd | LeftArrow,
|
|
2944
|
+
command: 'Editor.cursorWordLeft',
|
|
2945
|
+
when: FocusEditorText
|
|
2946
|
+
}, {
|
|
2947
|
+
key: Alt$1 | Backspace,
|
|
2948
|
+
command: 'Editor.deleteWordPartLeft',
|
|
2949
|
+
when: FocusEditorText
|
|
2950
|
+
}, {
|
|
2951
|
+
key: Alt$1 | Delete,
|
|
2952
|
+
command: 'Editor.deleteWordPartRight',
|
|
2953
|
+
when: FocusEditorText
|
|
2954
|
+
}, {
|
|
2955
|
+
key: CtrlCmd | Backspace,
|
|
2956
|
+
command: 'Editor.deleteWordLeft',
|
|
2957
|
+
when: FocusEditorText
|
|
2958
|
+
}, {
|
|
2959
|
+
key: CtrlCmd | Delete,
|
|
2960
|
+
command: 'Editor.deleteWordRight',
|
|
2961
|
+
when: FocusEditorText
|
|
2962
|
+
}, {
|
|
2963
|
+
key: CtrlCmd | KeyD,
|
|
2964
|
+
command: 'Editor.selectNextOccurrence',
|
|
2965
|
+
when: FocusEditorText
|
|
2966
|
+
}, {
|
|
2967
|
+
key: CtrlCmd | KeyJ,
|
|
2968
|
+
command: 'Editor.openColorPicker',
|
|
2969
|
+
when: FocusEditorText
|
|
2970
|
+
}, {
|
|
2971
|
+
key: CtrlCmd | Period,
|
|
2972
|
+
command: 'Editor.showSourceActions2',
|
|
2973
|
+
when: FocusEditorText
|
|
2974
|
+
}, {
|
|
2975
|
+
key: Tab,
|
|
2976
|
+
command: 'Editor.handleTab',
|
|
2977
|
+
when: FocusEditorText
|
|
2978
|
+
}, {
|
|
2979
|
+
key: Shift | Tab,
|
|
2980
|
+
command: 'Editor.unindent',
|
|
2981
|
+
when: FocusEditorText
|
|
2982
|
+
}, {
|
|
2983
|
+
key: CtrlCmd | BracketLeft,
|
|
2984
|
+
command: 'Editor.indentLess',
|
|
2985
|
+
when: FocusEditorText
|
|
2986
|
+
}, {
|
|
2987
|
+
key: Escape,
|
|
2988
|
+
command: 'Editor.closeFind',
|
|
2989
|
+
when: FocusFindWidget
|
|
2990
|
+
}, {
|
|
2991
|
+
key: CtrlCmd | KeyF,
|
|
2992
|
+
command: 'Editor.openFind2',
|
|
2993
|
+
when: FocusEditorText
|
|
2994
|
+
}, {
|
|
2995
|
+
key: CtrlCmd | KeyK,
|
|
2996
|
+
command: 'Editor.openCodeGenerator',
|
|
2997
|
+
when: FocusEditorText
|
|
2998
|
+
}, {
|
|
2999
|
+
key: Escape,
|
|
3000
|
+
command: 'Editor.closeCodeGenerator',
|
|
3001
|
+
when: FocusEditorCodeGenerator
|
|
3002
|
+
}, {
|
|
3003
|
+
key: Enter,
|
|
3004
|
+
command: 'EditorCodeGenerator.accept',
|
|
3005
|
+
when: FocusEditorCodeGenerator
|
|
3006
|
+
}, {
|
|
3007
|
+
key: CtrlCmd | BracketRight,
|
|
3008
|
+
command: 'Editor.indentMore',
|
|
3009
|
+
when: FocusEditorText
|
|
3010
|
+
}, {
|
|
3011
|
+
key: Shift | LeftArrow,
|
|
3012
|
+
command: 'Editor.selectCharacterLeft',
|
|
3013
|
+
when: FocusEditorText
|
|
3014
|
+
}, {
|
|
3015
|
+
key: CtrlCmd | Shift | LeftArrow,
|
|
3016
|
+
command: 'Editor.selectWordLeft',
|
|
3017
|
+
when: FocusEditorText
|
|
3018
|
+
}, {
|
|
3019
|
+
key: Shift | RightArrow,
|
|
3020
|
+
command: 'Editor.selectCharacterRight',
|
|
3021
|
+
when: FocusEditorText
|
|
3022
|
+
}, {
|
|
3023
|
+
key: CtrlCmd | Shift | RightArrow,
|
|
3024
|
+
command: 'Editor.selectWordRight',
|
|
3025
|
+
when: FocusEditorText
|
|
3026
|
+
}, {
|
|
3027
|
+
key: CtrlCmd | KeyL,
|
|
3028
|
+
command: 'Editor.selectLine',
|
|
3029
|
+
when: FocusEditorText
|
|
3030
|
+
}, {
|
|
3031
|
+
key: CtrlCmd | Shift | Backspace,
|
|
3032
|
+
command: 'Editor.deleteAllLeft',
|
|
3033
|
+
when: FocusEditorText
|
|
3034
|
+
}, {
|
|
3035
|
+
key: CtrlCmd | Shift | Delete,
|
|
3036
|
+
command: 'Editor.deleteAllRight',
|
|
3037
|
+
when: FocusEditorText
|
|
3038
|
+
}, {
|
|
3039
|
+
key: Escape,
|
|
3040
|
+
command: 'Editor.cancelSelection',
|
|
3041
|
+
when: FocusEditorText
|
|
3042
|
+
}, {
|
|
3043
|
+
key: CtrlCmd | KeyZ,
|
|
3044
|
+
command: 'Editor.undo',
|
|
3045
|
+
when: FocusEditorText
|
|
3046
|
+
}, {
|
|
3047
|
+
key: LeftArrow,
|
|
3048
|
+
command: 'Editor.cursorLeft',
|
|
3049
|
+
when: FocusEditorText
|
|
3050
|
+
}, {
|
|
3051
|
+
key: RightArrow,
|
|
3052
|
+
command: 'Editor.cursorRight',
|
|
3053
|
+
when: FocusEditorText
|
|
3054
|
+
}, {
|
|
3055
|
+
key: UpArrow,
|
|
3056
|
+
command: 'Editor.cursorUp',
|
|
3057
|
+
when: FocusEditorText
|
|
3058
|
+
}, {
|
|
3059
|
+
key: DownArrow,
|
|
3060
|
+
command: 'Editor.cursorDown',
|
|
3061
|
+
when: FocusEditorText
|
|
3062
|
+
}, {
|
|
3063
|
+
key: Backspace,
|
|
3064
|
+
command: 'Editor.deleteLeft',
|
|
3065
|
+
when: FocusEditorText
|
|
3066
|
+
}, {
|
|
3067
|
+
key: Delete,
|
|
3068
|
+
command: 'Editor.deleteRight',
|
|
3069
|
+
when: FocusEditorText
|
|
3070
|
+
}, {
|
|
3071
|
+
key: Enter,
|
|
3072
|
+
command: 'Editor.insertLineBreak',
|
|
3073
|
+
when: FocusEditorText
|
|
3074
|
+
}, {
|
|
3075
|
+
key: CtrlCmd | Shift | KeyD,
|
|
3076
|
+
command: 'Editor.copyLineDown',
|
|
3077
|
+
when: FocusEditorText
|
|
3078
|
+
}, {
|
|
3079
|
+
key: CtrlCmd | Shift | DownArrow,
|
|
3080
|
+
command: 'Editor.moveLineDown',
|
|
3081
|
+
when: FocusEditorText
|
|
3082
|
+
}, {
|
|
3083
|
+
key: CtrlCmd | Shift | UpArrow,
|
|
3084
|
+
command: 'Editor.moveLineUp',
|
|
3085
|
+
when: FocusEditorText
|
|
3086
|
+
}, {
|
|
3087
|
+
key: CtrlCmd | Space$1,
|
|
3088
|
+
command: 'Editor.openCompletion',
|
|
3089
|
+
when: FocusEditorText
|
|
3090
|
+
}, {
|
|
3091
|
+
key: F2,
|
|
3092
|
+
command: 'Editor.openRename',
|
|
3093
|
+
when: FocusEditorText
|
|
3094
|
+
}, {
|
|
3095
|
+
key: Enter,
|
|
3096
|
+
command: 'EditorRename.accept',
|
|
3097
|
+
when: FocusEditorRename
|
|
3098
|
+
}, {
|
|
3099
|
+
key: Escape,
|
|
3100
|
+
command: 'Editor.closeRename',
|
|
3101
|
+
when: FocusEditorRename
|
|
3102
|
+
}, {
|
|
3103
|
+
key: Home,
|
|
3104
|
+
command: 'Editor.cursorHome',
|
|
3105
|
+
when: FocusEditorText
|
|
3106
|
+
}, {
|
|
3107
|
+
key: End,
|
|
3108
|
+
command: 'Editor.cursorEnd',
|
|
3109
|
+
when: FocusEditorText
|
|
3110
|
+
}, {
|
|
3111
|
+
key: CtrlCmd | Slash$1,
|
|
3112
|
+
command: 'Editor.toggleComment',
|
|
3113
|
+
when: FocusEditorText
|
|
3114
|
+
}, {
|
|
3115
|
+
key: CtrlCmd | KeyC,
|
|
3116
|
+
command: 'Editor.copy',
|
|
3117
|
+
when: FocusEditorText
|
|
3118
|
+
}, {
|
|
3119
|
+
key: CtrlCmd | KeyA,
|
|
3120
|
+
command: 'Editor.selectAll',
|
|
3121
|
+
when: FocusEditorText
|
|
3122
|
+
}, {
|
|
3123
|
+
key: CtrlCmd | KeyH,
|
|
3124
|
+
command: 'Editor.showHover2',
|
|
3125
|
+
when: FocusEditorText
|
|
3126
|
+
}, {
|
|
3127
|
+
key: CtrlCmd | KeyX,
|
|
3128
|
+
command: 'Editor.cut',
|
|
3129
|
+
when: FocusEditorText
|
|
3130
|
+
}, {
|
|
3131
|
+
key: CtrlCmd | KeyV,
|
|
3132
|
+
command: 'Editor.paste',
|
|
3133
|
+
when: FocusEditorText
|
|
3134
|
+
}, {
|
|
3135
|
+
key: Alt$1 | LeftArrow,
|
|
3136
|
+
command: 'Editor.cursorWordPartLeft',
|
|
3137
|
+
when: FocusEditorText
|
|
3138
|
+
}, {
|
|
3139
|
+
key: Alt$1 | RightArrow,
|
|
3140
|
+
command: 'Editor.cursorWordPartRight',
|
|
3141
|
+
when: FocusEditorText
|
|
3142
|
+
}, {
|
|
3143
|
+
key: Alt$1 | F3,
|
|
3144
|
+
command: 'Editor.selectAllOccurrences',
|
|
3145
|
+
when: FocusEditorText
|
|
3146
|
+
}, {
|
|
3147
|
+
key: Alt$1 | Shift | UpArrow,
|
|
3148
|
+
command: 'Editor.addCursorAbove',
|
|
3149
|
+
when: FocusEditorText
|
|
3150
|
+
}, {
|
|
3151
|
+
key: Alt$1 | Shift | DownArrow,
|
|
3152
|
+
command: 'Editor.addCursorBelow',
|
|
3153
|
+
when: FocusEditorText
|
|
3154
|
+
}, {
|
|
3155
|
+
key: Alt$1 | Shift | F12,
|
|
3156
|
+
command: 'Editor.findAllReferences',
|
|
3157
|
+
when: FocusEditorText
|
|
3158
|
+
}, {
|
|
3159
|
+
key: Alt$1 | Shift | KeyO,
|
|
3160
|
+
command: 'Editor.organizeImports',
|
|
3161
|
+
when: FocusEditorText
|
|
3162
|
+
}, {
|
|
3163
|
+
key: CtrlCmd | Shift | Space$1,
|
|
3164
|
+
command: 'Editor.selectionGrow',
|
|
3165
|
+
when: FocusEditor
|
|
3166
|
+
}];
|
|
3167
|
+
};
|
|
3168
|
+
|
|
2766
3169
|
const copyLineUp = editor => {
|
|
2767
3170
|
const {
|
|
2768
3171
|
selections
|
|
@@ -2885,7 +3288,7 @@ const characterRight = (line, columnIndex) => {
|
|
|
2885
3288
|
return next.segment.length;
|
|
2886
3289
|
};
|
|
2887
3290
|
const isWhitespace = char => {
|
|
2888
|
-
return char === Space$
|
|
3291
|
+
return char === Space$2 || char === Tab$1;
|
|
2889
3292
|
};
|
|
2890
3293
|
const lineCharacterStart = (line, columnIndex) => {
|
|
2891
3294
|
if (line.length === 0) {
|
|
@@ -5299,7 +5702,7 @@ const setFindWidgetFocus = (state, focusKey) => {
|
|
|
5299
5702
|
};
|
|
5300
5703
|
|
|
5301
5704
|
const focusCloseButton = state => {
|
|
5302
|
-
return setFindWidgetFocus(state, FocusFindWidgetCloseButton);
|
|
5705
|
+
return setFindWidgetFocus(state, FocusFindWidgetCloseButton$1);
|
|
5303
5706
|
};
|
|
5304
5707
|
|
|
5305
5708
|
const focusFind = state => {
|
|
@@ -5411,23 +5814,23 @@ const focusPrevious$1 = editor => {
|
|
|
5411
5814
|
};
|
|
5412
5815
|
|
|
5413
5816
|
const focusNextMatchButton = state => {
|
|
5414
|
-
return setFindWidgetFocus(state, FocusFindWidgetNextMatchButton);
|
|
5817
|
+
return setFindWidgetFocus(state, FocusFindWidgetNextMatchButton$1);
|
|
5415
5818
|
};
|
|
5416
5819
|
|
|
5417
5820
|
const focusPreviousMatchButton = state => {
|
|
5418
|
-
return setFindWidgetFocus(state, FocusFindWidgetPreviousMatchButton);
|
|
5821
|
+
return setFindWidgetFocus(state, FocusFindWidgetPreviousMatchButton$1);
|
|
5419
5822
|
};
|
|
5420
5823
|
|
|
5421
5824
|
const focusReplace = state => {
|
|
5422
|
-
return setFindWidgetFocus(state, FocusFindWidgetReplace);
|
|
5825
|
+
return setFindWidgetFocus(state, FocusFindWidgetReplace$1);
|
|
5423
5826
|
};
|
|
5424
5827
|
|
|
5425
5828
|
const focusReplaceAllButton = state => {
|
|
5426
|
-
return setFindWidgetFocus(state, FocusFindWidgetReplaceAllButton);
|
|
5829
|
+
return setFindWidgetFocus(state, FocusFindWidgetReplaceAllButton$1);
|
|
5427
5830
|
};
|
|
5428
5831
|
|
|
5429
5832
|
const focusReplaceButton = state => {
|
|
5430
|
-
return setFindWidgetFocus(state, FocusFindWidgetReplaceButton);
|
|
5833
|
+
return setFindWidgetFocus(state, FocusFindWidgetReplaceButton$1);
|
|
5431
5834
|
};
|
|
5432
5835
|
|
|
5433
5836
|
const focusToggleReplaceButton = state => {
|
|
@@ -5480,11 +5883,11 @@ const handleFindWidgetFocus = (state, focusKey) => {
|
|
|
5480
5883
|
};
|
|
5481
5884
|
|
|
5482
5885
|
const handleReplaceAllFocus = state => {
|
|
5483
|
-
return handleFindWidgetFocus(state, FocusFindWidgetReplaceAllButton);
|
|
5886
|
+
return handleFindWidgetFocus(state, FocusFindWidgetReplaceAllButton$1);
|
|
5484
5887
|
};
|
|
5485
5888
|
|
|
5486
5889
|
const handleReplaceFocus = state => {
|
|
5487
|
-
return handleFindWidgetFocus(state, FocusFindWidgetReplace);
|
|
5890
|
+
return handleFindWidgetFocus(state, FocusFindWidgetReplace$1);
|
|
5488
5891
|
};
|
|
5489
5892
|
|
|
5490
5893
|
const getFindWidgetHeight = replaceExpanded => {
|
|
@@ -5679,7 +6082,7 @@ const openRename = async editor => {
|
|
|
5679
6082
|
return latestState;
|
|
5680
6083
|
};
|
|
5681
6084
|
const fullFocus = true;
|
|
5682
|
-
return addWidgetToEditor(Rename, FocusEditorRename, editor, create$3, newStateGenerator, fullFocus);
|
|
6085
|
+
return addWidgetToEditor(Rename, FocusEditorRename$1, editor, create$3, newStateGenerator, fullFocus);
|
|
5683
6086
|
};
|
|
5684
6087
|
|
|
5685
6088
|
const getOrganizeImportEdits = async editor => {
|
|
@@ -8071,9 +8474,7 @@ const getLineInfoVirtualDom = lineInfo => {
|
|
|
8071
8474
|
type: Span,
|
|
8072
8475
|
className: tokenClass,
|
|
8073
8476
|
childCount: 1
|
|
8074
|
-
},
|
|
8075
|
-
// @ts-ignore
|
|
8076
|
-
text(tokenText));
|
|
8477
|
+
}, text(tokenText));
|
|
8077
8478
|
}
|
|
8078
8479
|
return dom;
|
|
8079
8480
|
};
|
|
@@ -9345,7 +9746,7 @@ const keep = [
|
|
|
9345
9746
|
// 'ColorPicker.handleSliderPointerDown',
|
|
9346
9747
|
// 'ColorPicker.handleSliderPointerMove',
|
|
9347
9748
|
// 'ColorPicker.loadContent',
|
|
9348
|
-
'Editor.create', 'Editor.getWordAt', 'Editor.getWordBefore', 'Editor.offsetAt', 'Editor.render',
|
|
9749
|
+
'Editor.create', 'Editor.getWordAt', 'Editor.getWordBefore', 'Editor.offsetAt', 'Editor.render', 'Editor.getKeyBindings',
|
|
9349
9750
|
// 'ColorPicker.render',
|
|
9350
9751
|
'Editor.getText', 'Editor.getSelections', 'Font.ensure', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize'];
|
|
9351
9752
|
|
|
@@ -9476,6 +9877,7 @@ const commandMap = {
|
|
|
9476
9877
|
'Editor.deleteWordRight': deleteWordRight,
|
|
9477
9878
|
'Editor.findAllReferences': findAllReferences,
|
|
9478
9879
|
'Editor.format': format,
|
|
9880
|
+
'Editor.getKeyBindings': getKeyBindings,
|
|
9479
9881
|
'Editor.getSelections': getSelections,
|
|
9480
9882
|
'Editor.getText': getText,
|
|
9481
9883
|
'Editor.getWordAt': getWordAt,
|
|
@@ -10914,15 +11316,15 @@ const getFindWidgetFocusSelector = focus => {
|
|
|
10914
11316
|
{
|
|
10915
11317
|
return `[name="${SearchValue}"]`;
|
|
10916
11318
|
}
|
|
10917
|
-
case FocusFindWidgetReplace:
|
|
11319
|
+
case FocusFindWidgetReplace$1:
|
|
10918
11320
|
{
|
|
10919
11321
|
return `[name="${ReplaceValue}"]`;
|
|
10920
11322
|
}
|
|
10921
|
-
case FocusFindWidgetReplaceAllButton:
|
|
11323
|
+
case FocusFindWidgetReplaceAllButton$1:
|
|
10922
11324
|
{
|
|
10923
11325
|
return `[name="${ReplaceAll}"]`;
|
|
10924
11326
|
}
|
|
10925
|
-
case FocusFindWidgetCloseButton:
|
|
11327
|
+
case FocusFindWidgetCloseButton$1:
|
|
10926
11328
|
{
|
|
10927
11329
|
return `[name="${Close}"]`;
|
|
10928
11330
|
}
|
|
@@ -10930,15 +11332,15 @@ const getFindWidgetFocusSelector = focus => {
|
|
|
10930
11332
|
{
|
|
10931
11333
|
return `[name="${ToggleReplace}"]`;
|
|
10932
11334
|
}
|
|
10933
|
-
case FocusFindWidgetNextMatchButton:
|
|
11335
|
+
case FocusFindWidgetNextMatchButton$1:
|
|
10934
11336
|
{
|
|
10935
11337
|
return `[name="${FocusNext}"]`;
|
|
10936
11338
|
}
|
|
10937
|
-
case FocusFindWidgetPreviousMatchButton:
|
|
11339
|
+
case FocusFindWidgetPreviousMatchButton$1:
|
|
10938
11340
|
{
|
|
10939
11341
|
return `[name="${FocusPrevious}"]`;
|
|
10940
11342
|
}
|
|
10941
|
-
case FocusFindWidgetReplaceButton:
|
|
11343
|
+
case FocusFindWidgetReplaceButton$1:
|
|
10942
11344
|
{
|
|
10943
11345
|
return `[name="${Replace}"]`;
|
|
10944
11346
|
}
|