diff --git a/src/app/project.coffee b/src/app/project.coffee index 3c10f744a..e2ad125d3 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -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() diff --git a/src/packages/command-panel/lib/operation.coffee b/src/packages/command-panel/lib/operation.coffee index f9b22973c..af963d8ca 100644 --- a/src/packages/command-panel/lib/operation.coffee +++ b/src/packages/command-panel/lib/operation.coffee @@ -24,9 +24,9 @@ class Operation 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..] + prefix = @lineText[0...range.start.column] + match = @lineText[range.start.column...range.end.column] + suffix = @lineText[range.end.column..] {prefix, suffix, match, range}