Trying to clena the mess opened by plugins

This commit is contained in:
2026-02-21 01:03:55 +01:00
parent 5ef988382b
commit e9bca2548c
67 changed files with 1246 additions and 69 deletions

View File

@@ -675,8 +675,9 @@ fn handle_options_click(ctx: &mut InputContext, col: u16, row: u16, area: Rect)
}
let focus = ctx.app.options.focus;
let focus_line = focus.line_index();
let total_lines = 35;
let plugin_mode = ctx.app.plugin_mode;
let focus_line = focus.line_index(plugin_mode);
let total_lines = if plugin_mode { 43 } else { 40 };
let max_visible = padded.height as usize;
let scroll_offset = if total_lines <= max_visible {
@@ -690,7 +691,7 @@ fn handle_options_click(ctx: &mut InputContext, col: u16, row: u16, area: Rect)
let relative_y = (row - padded.y) as usize;
let abs_line = scroll_offset + relative_y;
if let Some(new_focus) = OptionsFocus::at_line(abs_line) {
if let Some(new_focus) = OptionsFocus::at_line(abs_line, plugin_mode) {
ctx.dispatch(AppCommand::OptionsSetFocus(new_focus));
// Value area starts at prefix(2) + label(20) = offset 22 from padded.x