|
|
@@ -50,8 +50,10 @@ define [
|
|
|
annotations: "="
|
|
|
navigateHighlights: "="
|
|
|
fileName: "="
|
|
|
- onCtrlEnter: "="
|
|
|
- onCtrlJ: "="
|
|
|
+ onCtrlEnter: "=" # Compile
|
|
|
+ onCtrlJ: "=" # Toggle the review panel
|
|
|
+ onCtrlShiftC: "=" # Add a new comment
|
|
|
+ onCtrlShiftA: "=" # Toggle track-changes on/off
|
|
|
syntaxValidation: "="
|
|
|
reviewPanel: "="
|
|
|
eventsBridge: "="
|
|
|
@@ -172,6 +174,26 @@ define [
|
|
|
callback()
|
|
|
readOnly: true
|
|
|
|
|
|
+ scope.$watch "onCtrlShiftC", (callback) ->
|
|
|
+ if callback?
|
|
|
+ editor.commands.addCommand
|
|
|
+ name: "add-new-comment",
|
|
|
+ bindKey: win: "Ctrl-Shift-C", mac: "Command-Shift-C"
|
|
|
+ exec: (editor) =>
|
|
|
+ selection = editor.getSelection()
|
|
|
+ if !selection.isEmpty()
|
|
|
+ callback()
|
|
|
+ readOnly: true
|
|
|
+
|
|
|
+ scope.$watch "onCtrlShiftA", (callback) ->
|
|
|
+ if callback?
|
|
|
+ editor.commands.addCommand
|
|
|
+ name: "toggle-track-changes",
|
|
|
+ bindKey: win: "Ctrl-Shift-A", mac: "Command-Shift-A"
|
|
|
+ exec: (editor) =>
|
|
|
+ callback()
|
|
|
+ readOnly: true
|
|
|
+
|
|
|
# Make '/' work for search in vim mode.
|
|
|
editor.showCommandLine = (arg) =>
|
|
|
if arg == "/"
|