~jamii/focus

1184f24978a2beca6b7499c0384bcc7471db3e02 — Jamie Brandon 9 months ago 57d9303
Bug fix - top_pixel counts wrapped lines
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/focus/editor.zig
M lib/focus/editor.zig => lib/focus/editor.zig +1 -1
@@ 194,7 194,7 @@ pub const Editor = struct {
                            'k' => {
                                for (self.cursors.items) |*cursor| self.goBufferEnd(cursor);
                                // hardcode because we want to scroll even if cursor didn't move
                                self.top_pixel = @intCast(Coord, self.buffer.countLines()) * self.app.atlas.char_height;
                                self.top_pixel = @intCast(Coord, self.line_wrapped_buffer.countLines()) * self.app.atlas.char_height;
                            },
                            'i' => {
                                for (self.cursors.items) |*cursor| self.goBufferStart(cursor);