From da41c28fdb0884258f124d1f97fe9c5f9cdb0f6e Mon Sep 17 00:00:00 2001 From: Jamie Peabody Date: Tue, 28 Feb 2017 22:32:46 +0000 Subject: [PATCH] Added ignorecase to editor --- editor/editor.js | 11 +++++++++++ editor/editor.php | 1 + lib/mergely.js | 5 ++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/editor/editor.js b/editor/editor.js index 5636b01..b2ffc14 100644 --- a/editor/editor.js +++ b/editor/editor.js @@ -114,6 +114,7 @@ $(document).ready(function() { var optmap = { au: 'autoupdate', ws: 'ignorews', + cs: 'ignorecase', sb: 'sidebar', vp: 'viewport', wl: 'wrap_lines', @@ -223,6 +224,15 @@ $(document).ready(function() { updateHistory(params); } }, + 'options-ignorecase': { + get: function() { return ed.mergely('options').ignorecase }, + set: function(value) { + var cs = !ed.mergely('options').ignorecase; + ed.mergely('options', {ignorecase: cs}); + var params = updateQueryStringParam('cs', cs ? 1 : 0, 0); + updateHistory(params); + } + }, 'options-sidebars': { get: function() { console.log('sidebar', this); return ed.mergely('options').sidebar }, set: function(value) { @@ -348,6 +358,7 @@ $(document).ready(function() { 'options-swapmargin', 'options-viewport', 'options-ignorews', + 'options-ignorecase', 'options-wrap', 'options-linenumbers', ].indexOf(id) >= 0) { diff --git a/editor/editor.php b/editor/editor.php index 01b38da..361a749 100644 --- a/editor/editor.php +++ b/editor/editor.php @@ -140,6 +140,7 @@ if (isset($_GET['debug'])) {