Only match brackets if underlayer is visible

This commit is contained in:
Kevin Sawicki
2013-04-05 12:50:46 -07:00
parent 763729d08d
commit b9fcfda904
2 changed files with 4 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ module.exports =
goToMatchingPair: (editor) ->
return unless @pairHighlighted
return unless underlayer = editor.getPane()?.find('.underlayer')
return unless underlayer.isVisible()
position = editor.getCursorBufferPosition()
previousPosition = position.translate([0, -1])

View File

@@ -34,6 +34,9 @@ $.fn.pageDown = ->
$.fn.isOnDom = ->
@closest(document.body).length is 1
$.fn.isVisible = ->
@is(':visible')
$.fn.containsElement = (element) ->
(element[0].compareDocumentPosition(this[0]) & 8) == 8