@lvce-editor/source-control-worker 2.9.0 → 2.10.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.
|
@@ -1113,6 +1113,9 @@ const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
|
1113
1113
|
const activateByEvent$1 = event => {
|
|
1114
1114
|
return invoke('ExtensionHostManagement.activateByEvent', event);
|
|
1115
1115
|
};
|
|
1116
|
+
const getPreference = async key => {
|
|
1117
|
+
return await invoke('Preferences.get', key);
|
|
1118
|
+
};
|
|
1116
1119
|
const openUri$1 = async (uri, focus, options) => {
|
|
1117
1120
|
await invoke('Main.openUri', uri, focus, options);
|
|
1118
1121
|
};
|
|
@@ -1644,7 +1647,7 @@ const getVisibleSourceControlItems = (items, minLineY, maxLineY, actionsCache, f
|
|
|
1644
1647
|
};
|
|
1645
1648
|
|
|
1646
1649
|
const get = key => {
|
|
1647
|
-
return
|
|
1650
|
+
return getPreference(key);
|
|
1648
1651
|
};
|
|
1649
1652
|
|
|
1650
1653
|
const getExtensions = async () => {
|
|
@@ -1746,7 +1749,7 @@ const loadContent = async (state, savedState) => {
|
|
|
1746
1749
|
const actionsCache = await requestSourceActions();
|
|
1747
1750
|
|
|
1748
1751
|
// TODO make preferences async and more functional
|
|
1749
|
-
const splitButtonEnabled = get();
|
|
1752
|
+
const splitButtonEnabled = await get('sourceControl.splitButtonEnabled');
|
|
1750
1753
|
const total = displayItems.length;
|
|
1751
1754
|
const contentHeight = total * itemHeight;
|
|
1752
1755
|
const listHeight = getListHeight(total, itemHeight, height);
|
|
@@ -1868,7 +1871,9 @@ const handleClickSourceControlButtons = async (state, index, name) => {
|
|
|
1868
1871
|
warn(`[source-control-worker] Button not found ${name}`);
|
|
1869
1872
|
return state;
|
|
1870
1873
|
}
|
|
1871
|
-
const
|
|
1874
|
+
const {
|
|
1875
|
+
file
|
|
1876
|
+
} = item;
|
|
1872
1877
|
await executeCommand(button.command, file);
|
|
1873
1878
|
const newState = await refresh(state);
|
|
1874
1879
|
return newState;
|