mirror of
https://github.com/atom/atom.git
synced 2026-02-15 17:15:24 -05:00
Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -22,4 +22,4 @@ class SelectAllMatchesInProject extends Command
|
||||
))
|
||||
|
||||
promise.done -> deferred.resolve(operations)
|
||||
deferred.promise()
|
||||
deferred.promise()
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user