feat: add separate config option for vcs blame alignment
This commit is contained in:
parent
049cecdae6
commit
032b1ae14a
2 changed files with 4 additions and 4 deletions
|
|
@ -20,6 +20,7 @@ whitespace_mode: WhitespaceMode = .indent,
|
|||
inline_diagnostics: bool = true,
|
||||
inline_diagnostics_alignment: Alignment = .right,
|
||||
inline_vcs_blame: bool = false,
|
||||
inline_vcs_blame_alignment: Alignment = .right,
|
||||
animation_min_lag: usize = 0, //milliseconds
|
||||
animation_max_lag: usize = 50, //milliseconds
|
||||
hover_time_ms: usize = 500, //milliseconds
|
||||
|
|
|
|||
|
|
@ -1479,14 +1479,13 @@ pub const Editor = struct {
|
|||
.bg = if (hl_row) |_| theme.editor_line_highlight.bg else theme.editor_hint.bg,
|
||||
});
|
||||
|
||||
// Opposite as diagnostics
|
||||
switch (tui.config().inline_diagnostics_alignment) {
|
||||
.right => {
|
||||
switch (tui.config().inline_vcs_blame_alignment) {
|
||||
.left => {
|
||||
const width = self.plane.window.width;
|
||||
self.plane.cursor_move_yx(@intCast(pos.row), @intCast(width -| (screen_width - space_begin) + 2));
|
||||
_ = self.plane.print("{s}", .{msg}) catch 0;
|
||||
},
|
||||
.left => _ = self.plane.print_aligned_right(@intCast(pos.row), "{s}", .{msg[0..@min(screen_width - space_begin, msg.len)]}) catch {},
|
||||
.right => _ = self.plane.print_aligned_right(@intCast(pos.row), "{s}", .{msg[0..@min(screen_width - space_begin, msg.len)]}) catch {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue