summaryrefslogtreecommitdiff
path: root/src/pdf_view.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf_view.zig')
-rw-r--r--src/pdf_view.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pdf_view.zig b/src/pdf_view.zig
index e615521d..10e21a54 100644
--- a/src/pdf_view.zig
+++ b/src/pdf_view.zig
@@ -2364,7 +2364,7 @@ pub fn applyNormal(core: *pardes.Pardes, pane: *pardes.Pane, a: modal.Normal.Act
return;
},
.command_line => return tagline.enterTag(core, pane),
- .search => return core.startPrompt(pane, &pane.body, .{ .search = config.search_marker }),
+ .search => return panes.startPrompt(core, pane, &pane.body, .{ .search = config.search_marker }),
.search_next, .search_prev => return look.lookWalk(core, if (a.role == .search_next) 1 else -1),
else => false,
};
@@ -2622,7 +2622,7 @@ pub fn sameBytes(core: *pardes.Pardes, pane: *const pardes.Pane) bool {
/// can retire the corresponding directory watch before that id is reused.
pub fn deinitPane(core: *pardes.Pardes, pane: *pardes.Pane, state: *State) void {
if (comptime !enabled) return;
- if (core.paneIdOf(pane)) |id| core.emit(.{ .watch = .{ .pane = @intCast(id), .on = false } });
+ if (panes.paneIdOf(core, pane)) |id| core.emit(.{ .watch = .{ .pane = @intCast(id), .on = false } });
state.deinit(core.pdf_gpa);
core.pdf_gpa.destroy(state);
pane.pdf = null;
@@ -2929,7 +2929,7 @@ pub fn toggleTint(pane: *pardes.Pane) void {
pub fn paneViewport(core: *const pardes.Pardes, pane: *const pardes.Pane) ?Viewport {
if (comptime !enabled) return null;
- const rect = core.rects[core.paneIdOf(pane) orelse return null];
+ const rect = core.rects[panes.paneIdOf(core, pane) orelse return null];
const cols = rect.w -| config.GUTTER;
const rows = rect.h -| pane.tag_rows;
if (cols == 0 or rows == 0) return null;
@@ -2967,7 +2967,7 @@ pub fn paneGeometry(core: *const pardes.Pardes, pane: *const pardes.Pane) ?image
pub fn pageAtGridRow(core: *const pardes.Pardes, pane: *const pardes.Pane, row: u16) ?usize {
if (comptime !enabled) return null;
const state = pane.pdf orelse return null;
- const rect = core.rects[core.paneIdOf(pane) orelse return null];
+ const rect = core.rects[panes.paneIdOf(core, pane) orelse return null];
const body_y = core.bodyTop(pane, rect);
if (!state.layout_valid or row < body_y or row >= body_y + (rect.h -| pane.tag_rows)) return null;
const document_y = state.document_scroll_y + @as(f64, @floatFromInt(
@@ -3023,7 +3023,7 @@ pub fn panePointAtPage(
const raster = rasterForPageConst(state, page) orelse return null;
if (raster.rgba.len == 0) return null;
const placed = placedGeometry(state, raster, view, page) orelse return null;
- const rect = core.rects[core.paneIdOf(pane) orelse return null];
+ const rect = core.rects[panes.paneIdOf(core, pane) orelse return null];
const body_x = @as(i64, rect.x + config.GUTTER);
const body_y = @as(i64, core.bodyTop(pane, rect));
const px = (@as(i64, col) - body_x) * core.cell_pixels.w + core.cell_pixels.w / 2;