diff options
Diffstat (limited to 'tree-viz/src/app.rs')
-rw-r--r-- | tree-viz/src/app.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tree-viz/src/app.rs b/tree-viz/src/app.rs index 68d3641..8581084 100644 --- a/tree-viz/src/app.rs +++ b/tree-viz/src/app.rs | |||
@@ -105,6 +105,23 @@ impl App { | |||
105 | ) | 105 | ) |
106 | .unwrap(); | 106 | .unwrap(); |
107 | 107 | ||
108 | if self.config.show_field_name { | ||
109 | if let Some(f) = cursor.field_name() { | ||
110 | write!( | ||
111 | tree_string, | ||
112 | "{} ", | ||
113 | if in_capture.is_some() { | ||
114 | Style::new().on_yellow().on_bright() | ||
115 | } else { | ||
116 | Style::new() | ||
117 | } | ||
118 | .yellow() | ||
119 | .apply_to(f) | ||
120 | ) | ||
121 | .unwrap() | ||
122 | } | ||
123 | } | ||
124 | |||
108 | write!( | 125 | write!( |
109 | tree_string, | 126 | tree_string, |
110 | "{} ", | 127 | "{} ", |