Created
March 21, 2014 21:39
-
-
Save smashwilson/9697054 to your computer and use it in GitHub Desktop.
wat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[x, ourRef, ourText, theirText, theirRef] = m.match | |
console.log "Match range: #{m.range}" | |
[baseRow, baseCol] = m.range.start.toArray() | |
console.log "baseRow = #{baseRow}, baseCol = #{baseCol}" | |
ourLines = ourText.split /\n/ | |
ourRowStart = baseRow + 1 | |
ourRowEnd = ourRowStart + ourLines.length - 1 | |
console.log "baseRow = #{baseRow}, ourRowStart = #{ourRowStart}" | |
ourBannerMarker = editor.markBufferRange( | |
[[baseRow, 0], [ourRowStart, 0]]) | |
console.log "ourBannerMarker = #{ourBannerMarker.getBufferRange().toString()}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Match range: [(0, 0) - (14, 0)] conflict.coffee:36 | |
baseRow = 0, baseCol = 0 conflict.coffee:38 | |
baseRow = 0, ourRowStart = 1 conflict.coffee:44 | |
ourBannerMarker = [(8, 0) - (13, 0)] conflict.coffee:47 | |
Object | |
ourBannerMarker: "[(13, 0) - (14, 0)]" | |
ourRef: "[(13, 0) - (14, 0)]" | |
separatorRef: "[(7, 0) - (8, 0)]" | |
theirBannerRef: "[(13, 0) - (14, 0)]" | |
theirRef: "[(8, 0) - (13, 0)]" | |
__proto__: Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment