Relayout entries when commenting.

This commit is contained in:
Paulo Reis 2017-05-19 16:57:51 +01:00
parent 914e50f3f6
commit 58ad62c413
2 changed files with 5 additions and 4 deletions

View file

@ -180,9 +180,7 @@ define [
name: "add-new-comment",
bindKey: win: "Ctrl-Shift-C", mac: "Command-Shift-C"
exec: (editor) =>
selection = editor.getSelection()
if !selection.isEmpty()
callback()
callback()
readOnly: true
scope.$watch "onCtrlShiftA", (callback) ->

View file

@ -380,9 +380,12 @@ define [
$scope.toggleReviewPanel()
$scope.addNewCommentFromKbdShortcut = () ->
$scope.$broadcast "comment:start_adding"
$scope.$broadcast "comment:select_line"
if !$scope.ui.reviewPanelOpen
$scope.toggleReviewPanel()
$timeout () ->
$scope.$broadcast "review-panel:layout"
$scope.$broadcast "comment:start_adding"
$scope.startNewComment = () ->
$scope.$broadcast "comment:select_line"