diff options
Diffstat (limited to 'core/surface.zig')
| -rw-r--r-- | core/surface.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/surface.zig b/core/surface.zig index efc6d3f3..eb552cf1 100644 --- a/core/surface.zig +++ b/core/surface.zig @@ -211,6 +211,9 @@ pub const Surface = struct { /// bar: draw an insert-style thin cursor instead of the block cursor: ?struct { x: u16, y: u16, bar: bool = false } = null, placements: std.ArrayList(Placement) = .empty, + /// A tab's width in cells, as the core it draws has it (`render` sets + /// it from `settings.tab`). + tab: u16 = config.tab_width, pub fn tagLayers(s: *const Surface) []const Layer { return &s.tag_layers; @@ -301,7 +304,7 @@ pub const Surface = struct { var cp = decoded orelse 0xFFFD; if (cp == '\r') return col; if (cp == '\t') { - const spaces = @min(config.tab_now, end - col); + const spaces = @min(s.tab, end - col); s.fill(col, y, spaces, 1, style); return col + spaces; } |
