Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions st3/sublime_lib/settings_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ def subscribe(
then ``self.get(selector, default_value)`` is passed.
Otherwise, ``projection(self, selector)`` is passed.

Changes in the selected value are detected
by comparing the last known value to the current value
using the equality operator.
If you use a selector function,
the result must be equatable and should not be mutated.

`callback` should accept two arguments:
the new derived value and the previous derived value.

Expand Down