fixes #4751
This commit is contained in:
parent
259daf98cf
commit
568de6013f
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ import
|
||||||
os, strutils, parseopt, pegs, re, terminal
|
os, strutils, parseopt, pegs, re, terminal
|
||||||
|
|
||||||
const
|
const
|
||||||
Version = "1.0"
|
Version = "1.1"
|
||||||
Usage = "nimgrep - Nim Grep Utility Version " & Version & """
|
Usage = "nimgrep - Nim Grep Utility Version " & Version & """
|
||||||
|
|
||||||
(c) 2012 Andreas Rumpf
|
(c) 2012 Andreas Rumpf
|
||||||
|
|
@ -161,7 +161,7 @@ proc processFile(filename: string) =
|
||||||
t = findBounds(buffer, pegp, matches, i)
|
t = findBounds(buffer, pegp, matches, i)
|
||||||
else:
|
else:
|
||||||
t = findBounds(buffer, rep, matches, i)
|
t = findBounds(buffer, rep, matches, i)
|
||||||
if t.first <= 0: break
|
if t.first < 0: break
|
||||||
inc(line, countLines(buffer, i, t.first-1))
|
inc(line, countLines(buffer, i, t.first-1))
|
||||||
|
|
||||||
var wholeMatch = buffer.substr(t.first, t.last)
|
var wholeMatch = buffer.substr(t.first, t.last)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue