From 57f895dabd7cb9682e3c27d1120d93e638506fc0 Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Tue, 4 Feb 2020 22:18:58 +0900 Subject: [PATCH] Fix tabWidth setting updating --- CHANGELOG.md | 2 +- CotEditor/Sources/EditorTextView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d52fdf85..9f8434584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ Change Log ### Fixes - Fix an issue where the Unicode code point field in the document inspector displayed always “not selected.” -- Fix an issue where the editor's line height in the opened windows did not update even the setting is changed. +- Fix an issue where the editor's line height and tab width in the opened windows did not update even the setting is changed. - Improve stability. diff --git a/CotEditor/Sources/EditorTextView.swift b/CotEditor/Sources/EditorTextView.swift index b10f334eb..c4c6ab378 100644 --- a/CotEditor/Sources/EditorTextView.swift +++ b/CotEditor/Sources/EditorTextView.swift @@ -1143,7 +1143,7 @@ final class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, Multi @objc var tabWidth: Int { didSet { - tabWidth = max(oldValue, 0) + tabWidth = max(tabWidth, 0) guard tabWidth != oldValue else { return }