Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 4652132

Browse files
committed
🔥 leftover console.log, cleanup
1 parent 0f7d73b commit 4652132

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/text-buffer.coffee

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,19 +2034,15 @@ class TextBuffer
20342034
snapshot
20352035

20362036
restoreFromMarkerSnapshot: (snapshot, selectionsMarkerLayer) ->
2037-
console.log 'restore', selectionsMarkerLayer
2038-
20392037
if selectionsMarkerLayer?
2040-
# When snapshot includes multiple layerSnapshot of `role`, disable snapshot restore target redirection
2041-
# to avoid multiple layerSnapshots being restored to single markerLayer.
2038+
# Do selective selections marker restoration only when snapshot includes single selections snapshot.
20422039
selectionsSnapshotIds = Object.keys(snapshot).filter (id) => @selectionsMarkerLayerIds.has(id)
20432040
if selectionsSnapshotIds.length is 1
20442041
selectionsSnapshotId = selectionsSnapshotIds[0]
2045-
alwaysCreate = selectionsSnapshotId isnt selectionsMarkerLayer.id
20462042

20472043
for markerLayerId, layerSnapshot of snapshot
2048-
if selectionsMarkerLayer? and markerLayerId is selectionsSnapshotId
2049-
@markerLayers[selectionsMarkerLayer.id].restoreFromSnapshot(layerSnapshot, alwaysCreate)
2044+
if markerLayerId is selectionsSnapshotId
2045+
@markerLayers[selectionsMarkerLayer.id].restoreFromSnapshot(layerSnapshot, markerLayerId isnt selectionsMarkerLayer.id)
20502046
else
20512047
@markerLayers[markerLayerId]?.restoreFromSnapshot(layerSnapshot)
20522048

0 commit comments

Comments
 (0)