-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Conversation
@@ -176,9 +176,15 @@ class TextEditor extends Model | |||
@subscribe @displayBuffer.onDidAddDecoration (decoration) => @emit 'decoration-added', decoration | |||
@subscribe @displayBuffer.onDidRemoveDecoration (decoration) => @emit 'decoration-removed', decoration | |||
|
|||
subscribeToTabTypeConfig: -> | |||
@tabTypeSubscription?.dispose() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not super pretty. As I need to either add it to @disposables
then remove on a grammar change, or explicitly destroy it in the destroyed
method. I chose the latter
Do you think we should deprecate |
One caveat with this is: if the user has explicitly set the soft tabs value to something and an event happens (config or grammar change), the user's setting is ignored and computed based on the rules of the setting. I thought it added extra complexity to support tracking the explicitly set choice, and I wasnt sure if it would be the correct behavior anyway. |
We could change the name to |
Anyone opposed to merging this? |
🚢 |
This does the simplest thing possible. When
editor.tabType
is set toauto
, it does what it did before. When it is set tohard
orsoft
, it uses those values all the time unlesssetSoftTabs()
is explicitly called. The API is unchanged. Specs have been consolidated a bit as there were a couple places where the tab stuff was being tested.Eventually (another PR), I'd like to change the name of
editor.softTabs
setting toeditor.defaultTabType
or something more clear.Closes #8186 @Abdillah, I've used a couple of your commits.
Closes #3719