소스 검색

Sycn track changes based on doc state, not editor state

James Allen 9 년 전
부모
커밋
d9b774bb9b
2개의 변경된 파일과 4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      services/web/public/coffee/ide/editor/Document.coffee
  2. 1 1
      services/web/public/coffee/ide/editor/EditorManager.coffee

+ 3 - 0
services/web/public/coffee/ide/editor/Document.coffee

@@ -84,6 +84,9 @@ define [
 		setTrackingChanges: (track_changes) ->
 		setTrackingChanges: (track_changes) ->
 			@doc.track_changes = track_changes
 			@doc.track_changes = track_changes
 		
 		
+		getTrackingChanges: () ->
+			!!@doc.track_changes
+		
 		setTrackChangesIdSeeds: (id_seeds) ->
 		setTrackChangesIdSeeds: (id_seeds) ->
 			@doc.track_changes_id_seeds = id_seeds
 			@doc.track_changes_id_seeds = id_seeds
 
 

+ 1 - 1
services/web/public/coffee/ide/editor/EditorManager.coffee

@@ -162,7 +162,7 @@ define [
 				@_syncTimeout = null
 				@_syncTimeout = null
 
 
 			want = @$scope.editor.wantTrackChanges
 			want = @$scope.editor.wantTrackChanges
-			have = @$scope.editor.trackChanges
+			have = doc.getTrackingChanges()
 			if want == have
 			if want == have
 				return
 				return