stream: stream_line_col includes current position in computation
This commit is contained in:
@@ -396,7 +396,7 @@ void stream_line_col(stream_t *stream, u64 *line, u64 *col)
|
|||||||
// Generate a string view from the stream of exactly the content /upto/
|
// Generate a string view from the stream of exactly the content /upto/
|
||||||
// stream.postion.
|
// stream.postion.
|
||||||
sv_t sv = stream_sv_abs(stream);
|
sv_t sv = stream_sv_abs(stream);
|
||||||
sv = sv_truncate(sv, stream->position);
|
sv = sv_truncate(sv, stream->position + 1);
|
||||||
|
|
||||||
*line = 1;
|
*line = 1;
|
||||||
*col = 0;
|
*col = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user