summaryrefslogtreecommitdiff
path: root/src/edit.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.zig')
-rw-r--r--src/edit.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/edit.zig b/src/edit.zig
index b2909d87..5dbce0bf 100644
--- a/src/edit.zig
+++ b/src/edit.zig
@@ -241,8 +241,8 @@ pub fn capturePointerSelection(p: *Pardes, pane: *Pane, slot: usize) !void {
if (raw) next = .{ .line = source.line + 1, .at = 0 };
const end = if (next.line == source.line) @min(line.len, @as(usize, @intCast(@max(0, next.at)))) else line.len;
const start: usize = @intCast(@max(0, source.at));
- const lo = @min(end, panes.File.byteAtDisplayFrom(line, start, @intCast(@max(0, left - prefix))));
- const at = @min(end, panes.File.byteAtDisplayFrom(line, start, @intCast(@max(0, right - prefix))));
+ const lo = @min(end, panes.File.byteAtDisplayFrom(line, start, @intCast(@max(0, left - prefix - source.pad))));
+ const at = @min(end, panes.File.byteAtDisplayFrom(line, start, @intCast(@max(0, right - prefix - source.pad))));
row.* = .{
.row = source.line,
.lo = lo,