small refactoring of search code

This commit is contained in:
zadam
2020-02-28 00:11:34 +01:00
parent 4bd298a55b
commit 2af37640d8
9 changed files with 32 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ async function convertMarkdownToHtml(text) {
const result = writer.render(parsed);
appContext.triggerEvent('executeInActiveEditor', {
appContext.triggerCommand('executeInActiveEditor', {
callback: textEditor => {
const viewFragment = textEditor.data.processor.toView(result);
const modelFragment = textEditor.data.toModel(viewFragment);

View File

@@ -106,7 +106,7 @@ export default class ApperanceOptions {
server.put('options/theme/' + newTheme);
});
this.$zoomFactorSelect.on('change', () => { appContext.triggerEvent('setZoomFactorAndSave', {zoomFactor: this.$zoomFactorSelect.val()}); });
this.$zoomFactorSelect.on('change', () => { appContext.triggerCommand('setZoomFactorAndSave', {zoomFactor: this.$zoomFactorSelect.val()}); });
this.$nativeTitleBarSelect.on('change', () => {
const nativeTitleBarVisible = this.$nativeTitleBarSelect.val() === 'show' ? 'true' : 'false';