Unverified Commit 2273cded authored by Adam Saponara's avatar Adam Saponara
Browse files

replace `viewport_bline` with `viewport_mark`.

`bview_t.viewport_bline` is a pointer to the line where we want to
begin rendering the buffer. if an action takes place that frees the
line pointed to by `viewport_bline`, and we don't safely update
`viewport_bline` before using it, we can potentially segfault. this
happened while playing around with coarse_undo (feature coming
shortly), in which `_bview_buffer_callback` attempted to use
`viewport_bline` after it had been freed.

marks are already maintained within buffer code, including the case
of a mark's line getting deleted. all buffer operations are
guaranteed to rectify all marks before returning, so it is safer to
use a mark instead of a bline pointer to denote the viewport.
parent 171f52b5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment