diff --git a/spec/app/project-spec.coffee b/spec/app/project-spec.coffee index 48f483fc5..53d17d5e0 100644 --- a/spec/app/project-spec.coffee +++ b/spec/app/project-spec.coffee @@ -251,12 +251,12 @@ describe "Project", -> expect(iterator.argsForCall[0][0]).toEqual path: project.resolve('a') - match: 'aaa' + match: 'aa ' range: [[0, 0], [0, 3]] expect(iterator.argsForCall[1][0]).toEqual path: project.resolve('a') - match: 'aa' + match: 'a ' range: [[1, 3], [1, 5]] describe "serialization", -> diff --git a/src/app/project.coffee b/src/app/project.coffee index d404495bc..04413e126 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -176,7 +176,7 @@ class Project for [column, length] in matchPositions range = new Range([row, column], [row, column + length]) - match = lineText.substr(column, length) + match = lineText.substr(column + 1, length) iterator({path, range, match}) deferred = $.Deferred() @@ -195,6 +195,7 @@ class Project command = require.resolve 'nak' args = ['--ackmate', regex.source, @getPath()] args.unshift("--addVCSIgnores") if config.get('nak.addVCSIgnores') + #console.log(args) new BufferedProcess({command, args, stdout, exit}) deferred