From 6842e8500a40d4218bd19ad3286ef08db96f5512 Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Wed, 15 Feb 2017 18:50:16 -0300 Subject: [PATCH] Make `quickEdit` `true` by default on Windows --- app/config-default.js | 6 +++--- lib/reducers/ui.js | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/config-default.js b/app/config-default.js index 2b2be53c..322605e7 100644 --- a/app/config-default.js +++ b/app/config-default.js @@ -79,11 +79,11 @@ module.exports = { bell: 'SOUND', // if true, selected text will automatically be copied to the clipboard - copyOnSelect: false, + copyOnSelect: false // if true, on right click selected text will be copied or pasted if no - // selection is present - quickEdit: false + // selection is present (true by default on Windows) + // quickEdit: true // URL to custom bell // bellSoundURL: 'http://example.com/bell.mp3', diff --git a/lib/reducers/ui.js b/lib/reducers/ui.js index 49089743..75876783 100644 --- a/lib/reducers/ui.js +++ b/lib/reducers/ui.js @@ -189,7 +189,10 @@ const reducer = (state = initial, action) => { ret.showWindowControls = config.showWindowControls; } - if (typeof (config.quickEdit) !== 'undefined' && + if (process.platform === 'win32' && + (config.quickEdit === undefined || config.quickEdit === null)) { + ret.quickEdit = true; + } else if (typeof (config.quickEdit) !== 'undefined' && config.quickEdit !== null) { ret.quickEdit = config.quickEdit; }