feat: add support for session local tab_width setting

This commit is contained in:
CJ van den Berg 2025-08-12 12:29:08 +02:00
parent 63a527726a
commit 4037d67fe9
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 8 additions and 2 deletions

View file

@ -24,6 +24,7 @@ allocator: Allocator,
rdr_: renderer,
config_: @import("config"),
config_bufs: [][]const u8,
session_tab_width: ?usize = null,
highlight_columns_: []const u16,
highlight_columns_configured: []const u16,
frame_time: usize, // in microseconds
@ -1122,6 +1123,11 @@ pub fn config() *const @import("config") {
return &current().config_;
}
pub fn get_tab_width() usize {
const self = current();
return self.session_tab_width orelse self.config_.tab_width;
}
pub fn highlight_columns() []const u16 {
return current().highlight_columns_;
}