From b8165466ea16659711cd69f97e5128cbcb644152 Mon Sep 17 00:00:00 2001 From: satyasaibhushan Date: Fri, 12 Mar 2021 20:11:15 +0530 Subject: [PATCH 1/2] removes findnext,findprev from cmController --- client/components/Nav.jsx | 2 -- client/modules/IDE/components/Editor.jsx | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 61e49167b5..bd43df21c5 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -867,8 +867,6 @@ Nav.propTypes = { cmController: PropTypes.shape({ tidyCode: PropTypes.func, showFind: PropTypes.func, - findNext: PropTypes.func, - findPrev: PropTypes.func, showReplace: PropTypes.func, getContent: PropTypes.func }), diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 5be24e3ff9..325b7f5ded 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -85,8 +85,6 @@ class Editor extends React.Component { } }, 2000); this.showFind = this.showFind.bind(this); - this.findNext = this.findNext.bind(this); - this.findPrev = this.findPrev.bind(this); this.showReplace = this.showReplace.bind(this); this.getContent = this.getContent.bind(this); } @@ -196,8 +194,6 @@ class Editor extends React.Component { this.props.provideController({ tidyCode: this.tidyCode, showFind: this.showFind, - findNext: this.findNext, - findPrev: this.findPrev, showReplace: this.showReplace, getContent: this.getContent }); @@ -317,16 +313,6 @@ class Editor extends React.Component { return updatedFile; } - findPrev() { - this._cm.focus(); - this._cm.execCommand('findPrev'); - } - - findNext() { - this._cm.focus(); - this._cm.execCommand('findNext'); - } - showFind() { this._cm.execCommand('findPersistent'); } From 9c43a194a31e2888361f60262a6e7f1b53d5e29a Mon Sep 17 00:00:00 2001 From: satyasaibhushan Date: Sat, 13 Mar 2021 00:08:02 +0530 Subject: [PATCH 2/2] change findNext to findPersistentNext --- client/modules/IDE/components/Editor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 325b7f5ded..4f5b35a318 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -147,8 +147,8 @@ class Editor extends React.Component { [`${metaKey}-Enter`]: () => null, [`Shift-${metaKey}-Enter`]: () => null, [`${metaKey}-F`]: 'findPersistent', - [`${metaKey}-G`]: 'findNext', - [`Shift-${metaKey}-G`]: 'findPrev', + [`${metaKey}-G`]: 'findPersistentNext', + [`Shift-${metaKey}-G`]: 'findPersistentPrev', [replaceCommand]: 'replace' });