fix: restore tab and diff context through jump history

This commit is contained in:
Valdemar Lorenzen
2026-10-12 14:45:49 +02:00
parent 6b7cfdea20
commit 054225686e
8 changed files with 679 additions and 39 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ Vamp.configure do |config|
config.bar.bottom = {
left: [:tabs], center: [], right: [:battery],
tabs: {
title: "{index} {name}{modified}", padding: 1,
title: "{index} {view}{name}{modified}", padding: 1,
leading_edge: "░▒▓", trailing_edge: "▓▒░", first_leading_edge: ""
},
battery: { padding: 1, leading_edge: "░▒▓", trailing_edge: "" }
@@ -75,7 +75,7 @@ Builtins are `:tabs`, `:battery`, `:mode`, `:path`, `:position`, `:language`, `:
A bar with no visible content consumes no row. For example, `config.bar.top = { left: [], center: [], right: [] }` removes the top bar. A bar whose only visible content is `:tabs` is hidden with a single tab, whether above or below the workspace. Narrow layouts first omit inactive tabs, then optional segments from group ends to avoid overlap; the active tab drops decorations before its title is clipped. Commands and buffer searches use floating input; operation feedback uses a bottom-right popup. Neither reserves a footer row.
Each segment's `title` is a literal template supporting only `{index}`, `{name}`, `{path}`, and `{modified}`: the one-based tab index, filename, file path, and dirty marker (`" [+]"` when dirty, `""` when clean). Tabs use each tab's buffer metadata; other segments use the active buffer. Tabs default to `"{index} {name}{modified}"`; an empty title on another segment uses its builtin content or named label value. Templates are not Ruby code and never invoke a render callback.
Each segment's `title` is a literal template supporting only `{index}`, `{view}`, `{name}`, `{path}`, and `{modified}`: the one-based tab index, comparison-view marker, filename, file path, and dirty marker (`" [+]"` when dirty, `""` when clean). `{view}` expands to `"Diff · "` when the tab owns a comparison or revision selector, otherwise `""`. Tabs use each tab's view and buffer metadata; other segments use the active context. Tabs default to `"{index} {view}{name}{modified}"`; custom templates without `{view}` retain their output. An empty title on another segment uses its builtin content or named label value. Templates are not Ruby code and never invoke a render callback.
`:path` and `{path}` abbreviate the actual home-directory prefix to `~/` (`~` for the home directory itself). This is display-only: save paths, buffer identity, and LSP file URIs retain the original path. Sibling directories with similar names are not abbreviated.