diff options
author | Paladox none <thomasmulhall410@yahoo.com> | 2021-08-03 05:33:00 +0000 |
---|---|---|
committer | Paladox none <thomasmulhall410@yahoo.com> | 2021-08-04 01:46:09 +0000 |
commit | a4e8c4501971cfcd5bb03b2338462370678f9b02 (patch) | |
tree | 4a82d8b30b85ac6dfeea1755953862c81d72d0c0 | |
parent | 1038ea3e665324b6d17bd6366c61abde471f50fa (diff) |
Add missing "Show trailing whitespace" to edit preference
Change-Id: I06c5e8a55aed877bcdef7f4a72a8771ad77f734c
(cherry picked from commit e82edf5c39aa98faced6b8774b5146cd5b0811a2)
-rw-r--r-- | polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.ts | 9 | ||||
-rw-r--r-- | polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.ts | 11 |
2 files changed, 20 insertions, 0 deletions
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 d49cb5a15c..72283d6cb6 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 @@ -36,6 +36,7 @@ export interface GrEditPreferences { showMatchBrackets: HTMLInputElement; editShowLineWrapping: HTMLInputElement; editShowTabs: HTMLInputElement; + editShowTrailingWhitespaceInput: HTMLInputElement; }; } @customElement('gr-edit-preferences') @@ -75,6 +76,14 @@ export class GrEditPreferences extends GestureEventListeners( 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 47e4592c40..93a2d1c97a 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 @@ -116,6 +116,17 @@ export const htmlTemplate = html` </span> </section> <section> + <span class="title">Show trailing whitespace</span> + <span class="value"> + <input + id="editShowTrailingWhitespaceInput" + type="checkbox" + checked$="[[editPrefs.show_whitespace_errors]]" + on-change="_handleEditShowTrailingWhitespaceTap" + /> + </span> + </section> + <section> <span class="title">Match brackets</span> <span class="value"> <input |