Fix off-by-one when iterating over selections that stretch into the history buf
Fixes #295
This commit is contained in:
parent
627b91ffba
commit
1603310b86
@ -1298,7 +1298,7 @@ visual_line_(Screen *self, index_type y) {
|
|||||||
static inline Line*
|
static inline Line*
|
||||||
range_line_(Screen *self, int y) {
|
range_line_(Screen *self, int y) {
|
||||||
if (y < 0) {
|
if (y < 0) {
|
||||||
historybuf_init_line(self->historybuf, -y, self->historybuf->line);
|
historybuf_init_line(self->historybuf, -(y + 1), self->historybuf->line);
|
||||||
return self->historybuf->line;
|
return self->historybuf->line;
|
||||||
}
|
}
|
||||||
linebuf_init_line(self->linebuf, y);
|
linebuf_init_line(self->linebuf, y);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user