cpangrep icon indicating copy to clipboard operation
cpangrep copied to clipboard

Add line number

Open SineSwiper opened this issue 13 years ago • 5 comments

Untested, but the code looks sound.

SineSwiper avatar Apr 26 '12 19:04 SineSwiper

Yes I agree using the marker is probably easiest, I think actually there are benefits to moving the code using zrevrangebyscore (code I mean to be precise is https://github.com/dgl/cpangrep/blob/master/lib/WWW/CPANGrep/Search.pm#L163) to the matcher (e.g. you mentioned line: as a filter in your other request).

You'll need a UNIX system (tested on Linux, probably works on OS X), I suspect the use of IO::AIO's mmap support means it won't work on Windows, sorry. It's not a case of make test, but a separate script, see the readme for full details.

(As for working around bugs in your editor's syntax highlighting, no thanks, fix your editor.)

dgl avatar Apr 30 '12 16:04 dgl

The marker is here ATM: https://github.com/dgl/cpangrep/blob/master/lib/WWW/CPANGrep/Slab/Writer.pm#L8 please extract to a constant somewhere if you do use it (refactoring cpangrep-matcher to be a little more modular might be nice too... ;) )

dgl avatar Apr 30 '12 16:04 dgl

I added matching line number calculation to the matcher so I could link excerpts directly to the source and just now found this issue. :) I'll push a pull request later today.

tsibley avatar Apr 18 '13 20:04 tsibley

This pull request can be closed. Line numbers are added by pull #28 which is merged.

tsibley avatar Apr 28 '13 23:04 tsibley

This pull request can be closed.

karenetheridge avatar May 22 '15 19:05 karenetheridge