summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruv Srivastava <dhruvsri@google.com>2021-04-14 17:42:31 +0200
committerPaladox none <thomasmulhall410@yahoo.com>2021-04-15 08:18:47 +0000
commit5c0c08071eeeb6bc229daa2c404ded9ed304ed45 (patch)
tree92ecc8cd4ca182f24e29c0befb8544d0e56c9f2e
parent0a9548f774ea2521a77cb0936d19e99e1b64c63b (diff)
Turn off syntax highlighting in comment context if disabled
If the user has set syntax highlighting off in diff preferences, then turn off syntax highlighting for comment context as well. Change-Id: I89625a9b15678c1a63543d36f9f7d835bb39b359 (cherry picked from commit 8dd11448f1e2e31bb82cb7f70d92d56565c42d35)
-rw-r--r--polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
index 6d376e5d23..5b70cb40e5 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
@@ -239,6 +239,7 @@ export class GrCommentThread extends KeyboardShortcutMixin(PolymerElement) {
// remaining space after comment card has rendered
line_wrapping: true,
};
+ this.syntaxLayer.setEnabled(!!prefs.syntax_highlighting);
});
this._setInitialExpandedState();
}