mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
UI: add cursor options to the script editor (#615)
This commit is contained in:
committed by
GitHub
parent
709875d9ca
commit
9e75621cd2
@@ -40,8 +40,13 @@ export function Toolbar({ editor, onSave }: IProps) {
|
||||
const { ram, ramEntries, isUpdatingRAM, options, saveOptions } = useScriptEditorContext();
|
||||
|
||||
const onOptionChange: OptionsModalProps["onOptionChange"] = (option, value) => {
|
||||
saveOptions({ ...options, [option]: value });
|
||||
editor?.updateOptions(options);
|
||||
const newOptions = { ...options, [option]: value };
|
||||
saveOptions(newOptions);
|
||||
// delaying editor options update to avoid an issue
|
||||
// where switching between vim and regular modes causes some settings to be reset
|
||||
setTimeout(() => {
|
||||
editor?.updateOptions(newOptions);
|
||||
}, 100);
|
||||
};
|
||||
|
||||
const onThemeChange = () => {
|
||||
|
||||
Reference in New Issue
Block a user