-
Notifications
You must be signed in to change notification settings - Fork 73
'did-change-text' event is not fired on empty("") to empty("") change after PR#274 #291
Comments
I think ideally, for performance reasons, we would never invoke So I guess I am happy with the current behavior. How bad is the breakage in the |
Not sure other breakage are exist.
|
Can you explain a case where a package relies on |
At least these core pkg calling
$ ag selectListView.reset
git-diff/lib/diff-list-view.js
44: this.selectListView.reset()
snippets/lib/snippets-available.js
51: this.selectListView.reset()
encoding-selector/lib/encoding-list-view.js
61: this.selectListView.reset()
grammar-selector/lib/grammar-list-view.js
59: this.selectListView.reset()
command-palette/lib/command-palette-view.js
111: this.selectListView.reset()
fuzzy-finder/lib/fuzzy-finder-view.js
168: this.selectListView.reset()
symbols-view/lib/symbols-view.js
188: this.selectListView.reset();
|
Why I cannot answer how bad this change is
|
I still don't understand why we should call |
This is body of didChangQuery(), it refresh rendered items by calling I've not investigated well yet, so above explanation is just a though I simulated in my mind.
|
I too not clearly understand how is actual bad impact by not calling onDidChange with empty to empty text. What I wanted to report is it introduce behavioral change in |
Ok, I think I see what you're saying. Let me try to summarize. In I think it does make sense to change
This way, we'll recompute the items but avoid calling the |
Thanks for reporting this and determining the cause of the problem. I agree that if there's user-facing impact we need to fix it. It just took me a minute to understand the problem. |
@maxbrunsfeld Your modification on |
@maxbrunsfeld
After PR #274, empty("") to empty("") text change no longer fire
did-change-text
.This seems to be a bit confusing since non empty same text change still fire
did-change-text
(e.g. "abc" to "abc").And noticed this change breaks at least select-list's test-spec.
Does this change intentional?
Impact
Some pkg feature assuming
editor.setText("")
always fireeditor.onDidChange
event, but this is no longer true after #274.assuming selectListView.reset() always fire event
But not fire when compactedChanges length become 0 in"" to "" change
At least I noticed select-list's spec was broken by this change here.
Reproduce
The text was updated successfully, but these errors were encountered: