Don't use the trackChanges engine in the history editor panel

This commit is contained in:
James Allen 2016-10-20 12:19:57 +01:00
parent 52f3fe7303
commit 2b94c69795
3 changed files with 5 additions and 3 deletions

View file

@ -39,7 +39,8 @@ div.full-size(
syntax-validation="settings.syntaxValidation",
review-panel="reviewPanel",
on-scroll="onScroll",
scroll-events="scrollEvents"
scroll-events="scrollEvents",
track-changes-enabled="true"
)
#review-panel
.review-panel-scroller

View file

@ -48,6 +48,7 @@ define [
reviewPanel: "="
onScroll: "="
scrollEvents: "="
trackChangesEnabled: "="
}
link: (scope, element, attrs) ->
# Don't freak out if we're already in an apply callback
@ -74,7 +75,7 @@ define [
highlightsManager = new HighlightsManager(scope, editor, element)
cursorPositionManager = new CursorPositionManager(scope, editor, element, localStorage)
trackChangesManager = new TrackChangesManager(scope, editor, element)
if window.location.search.match /tcon=true/ # track changes on
if scope.trackChangesEnabled and window.location.search.match /tcon=true/ # track changes on
trackChangesManager.enabled = true
# Prevert Ctrl|Cmd-S from triggering save dialog

View file

@ -103,7 +103,7 @@ define [
recalculateReviewEntriesScreenPositions: () ->
session = @editor.getSession()
renderer = @editor.renderer
for entry_id, entry of @$scope.reviewPanel.entries
for entry_id, entry of (@$scope.reviewPanel?.entries or {})
doc_position = @_shareJsOffsetToAcePosition(entry.offset)
screen_position = session.documentToScreenPosition(doc_position.row, doc_position.column)
y = screen_position.row * renderer.lineHeight