Stop whole-line selection on gutter clicks.
This commit is contained in:
parent
05a3577de9
commit
01d6c6d239
1 changed files with 5 additions and 0 deletions
|
@ -106,6 +106,7 @@ module.exports = class SpellView extends CocoView
|
||||||
@toggleControls null, @writable
|
@toggleControls null, @writable
|
||||||
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
||||||
$(@ace.container).find('.ace_gutter').on 'click mouseenter', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
$(@ace.container).find('.ace_gutter').on 'click mouseenter', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||||
|
$(@ace.container).find('.ace_gutter').on 'click', @onGutterClick
|
||||||
@initAutocomplete aceConfig.liveCompletion ? true
|
@initAutocomplete aceConfig.liveCompletion ? true
|
||||||
|
|
||||||
createACEShortcuts: ->
|
createACEShortcuts: ->
|
||||||
|
@ -796,6 +797,9 @@ module.exports = class SpellView extends CocoView
|
||||||
# @ is the gutter element
|
# @ is the gutter element
|
||||||
Backbone.Mediator.publish 'tome:jiggle-problem-alert', {}
|
Backbone.Mediator.publish 'tome:jiggle-problem-alert', {}
|
||||||
|
|
||||||
|
onGutterClick: =>
|
||||||
|
@ace.clearSelection()
|
||||||
|
|
||||||
onDisableControls: (e) -> @toggleControls e, false
|
onDisableControls: (e) -> @toggleControls e, false
|
||||||
onEnableControls: (e) -> @toggleControls e, @writable
|
onEnableControls: (e) -> @toggleControls e, @writable
|
||||||
toggleControls: (e, enabled) ->
|
toggleControls: (e, enabled) ->
|
||||||
|
@ -882,6 +886,7 @@ module.exports = class SpellView extends CocoView
|
||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
$(@ace?.container).find('.ace_gutter').off 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
$(@ace?.container).find('.ace_gutter').off 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||||
|
$(@ace?.container).find('.ace_gutter').off 'click', @onGutterClick
|
||||||
@firepad?.dispose()
|
@firepad?.dispose()
|
||||||
@ace?.commands.removeCommand command for command in @aceCommands
|
@ace?.commands.removeCommand command for command in @aceCommands
|
||||||
@ace?.destroy()
|
@ace?.destroy()
|
||||||
|
|
Reference in a new issue