fix: side scrolling of highlight_columns

This commit is contained in:
CJ van den Berg 2025-04-18 21:41:01 +02:00
parent e3fee6a415
commit 07a2c19b9d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1137,7 +1137,11 @@ pub const Editor = struct {
defer frame.deinit();
const hl_cols: []const u16 = tui.highlight_columns();
const alpha: u8 = tui.config().highlight_columns_alpha;
for (hl_cols) |hl_col| {
const offset = self.view.col;
for (hl_cols) |hl_col_| {
if (hl_col_ < offset) continue;
const hl_col = hl_col_ - offset;
if (hl_col > self.view.cols) continue;
for (0..self.view.rows) |row| for (0..self.view.cols) |col|
if (hl_col > 0 and hl_col <= col) {
self.plane.cursor_move_yx(@intCast(row), @intCast(col)) catch return;