Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search

This commit is contained in:
Garen Torikian
2013-04-02 14:05:00 -07:00
5 changed files with 10 additions and 10 deletions

View File

@@ -164,9 +164,9 @@ class Project
state = 'readingPath'
path = null
else
colonIndex = line.indexOf(':')
colonIndex = line.indexOf(': ')
matchInfo = line.substring(0, colonIndex)
lineText = line.substring(colonIndex + 1)
lineText = line.substring(colonIndex + 2)
readMatches(matchInfo, lineText)
readMatches = (matchInfo, lineText) ->
@@ -176,7 +176,7 @@ class Project
for [column, length] in matchPositions
range = new Range([row, column], [row, column + length])
match = lineText.substr(column + 1, length)
match = lineText.substr(column, length)
iterator({path, range, match, lineText})
deferred = $.Deferred()

View File

@@ -22,4 +22,4 @@ class SelectAllMatchesInProject extends Command
))
promise.done -> deferred.resolve(operations)
deferred.promise()
deferred.promise()

View File

@@ -23,10 +23,10 @@ class Operation
@getBufferRange() unless @preserveSelection
preview: ->
range = @bufferRange
prefix = @lineText[0...range.start.column + 1]
match = @lineText[range.start.column + 1...range.end.column + 1]
suffix = @lineText[range.end.column + 1..]
range = @getBufferRange()
prefix = @lineText[0...range.start.column]
match = @lineText[range.start.column...range.end.column]
suffix = @lineText[range.end.column..]
{prefix, suffix, match, range}

View File

@@ -56,7 +56,7 @@ class PreviewList extends ScrollView
pathView.addOperation(operation)
@lastRenderedOperationIndex++
break if not renderAll and @prop('scrollHeight') >= startingScrollHeight + @pixelOverdraw and @prop('scrollHeight') > @height() + @pixelOverdraw
pathViewForPath: (path) ->
pathView = @viewsForPath[path]
if not pathView