Support setting text direction via comand palette (#2194) (#2195)

This commit is contained in:
Rasmus Eneman 2020-06-11 01:12:22 +02:00 committed by GitHub
parent 44e15a34b7
commit a853752129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -646,6 +646,23 @@ const commands = [
} }
}, },
{
id: 'view.text-direction',
description: 'View: Set Text Direction',
subcommands: [{
id: 'view.text-direction-ltr',
description: 'Left to Right',
value: 'ltr'
}, {
id: 'view.text-direction-rtl',
description: 'Right to Left',
value: 'rtl'
}],
executeSubcommand: async (_, value) => {
ipcRenderer.send('mt::set-user-preference', { textDirection: value })
}
},
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Mark Text // Mark Text