Merge "Add missing "Show trailing whitespace" to edit preference"
diff --git a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.ts b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.ts
index 4909bef..7cfd1b3 100644
--- a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.ts
+++ b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.ts
@@ -35,6 +35,7 @@
showMatchBrackets: HTMLInputElement;
editShowLineWrapping: HTMLInputElement;
editShowTabs: HTMLInputElement;
+ editShowTrailingWhitespaceInput: HTMLInputElement;
};
}
@customElement('gr-edit-preferences')
@@ -89,6 +90,14 @@
this._handleEditPrefsChanged();
}
+ _handleEditShowTrailingWhitespaceTap() {
+ this.set(
+ 'editPrefs.show_whitespace_errors',
+ this.$.editShowTrailingWhitespaceInput.checked
+ );
+ this._handleEditPrefsChanged();
+ }
+
_handleMatchBracketsChanged() {
this.set('editPrefs.match_brackets', this.$.showMatchBrackets.checked);
this._handleEditPrefsChanged();
diff --git a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.ts b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.ts
index a51deaf..abd925f 100644
--- a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.ts
+++ b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.ts
@@ -85,6 +85,19 @@
</span>
</section>
<section>
+ <label for="showTrailingWhitespaceInput" class="title"
+ >Show trailing whitespace</label
+ >
+ <span class="value">
+ <input
+ id="editShowTrailingWhitespaceInput"
+ type="checkbox"
+ checked$="[[editPrefs.show_whitespace_errors]]"
+ on-change="_handleEditShowTrailingWhitespaceTap"
+ />
+ </span>
+ </section>
+ <section>
<label for="showMatchBrackets" class="title">Match brackets</label>
<span class="value">
<input