Skip to content
Snippets Groups Projects
Commit 9c2cb1f8 authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #3580 from metabase/fix-sql-editor-bracket-matching

Enable our custom SQLBehavior for SQL modes
parents 1e15e99d 4cab4b19
Branches
Tags
No related merge requests found
......@@ -113,7 +113,7 @@ export default class NativeQueryEditor extends Component {
if (editor.getSession().$modeId !== modeInfo.mode) {
editor.getSession().setMode(modeInfo.mode);
// monkey patch the mode to add our bracket/paren/braces-matching behavior
if (!editor.getSession().$mode.$behaviour) {
if (this.state.modeInfo.mode.indexOf("sql") >= 0) {
editor.getSession().$mode.$behaviour = new SQLBehaviour();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment