on master help sign in
Show debugger output in the statusline
commit462c8a6ec8799ad0dfc9b6643d78ae8372f04945 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 21 Aug 2021, 20:29 (5 years ago) parentafeaba1
1 file changed+11
helix-term/src/application.rs+11
helix-term/src/application.rs+11
@@ -222,6 +222,17 @@ impl Application {
222222 self.editor.set_status(status);
223223 self.render();
224224 }
225+ "output" => {
226+ let body: helix_dap::events::Output = from_value(ev.body.expect("`output` event must have a body")).unwrap();
227+
228+ let prefix = match body.category {
229+ Some(category) => format!("Debug ({}):", category),
230+ None => "Debug:".to_owned(),
231+ };
232+
233+ self.editor.set_status(format!("{} {}", prefix, body.output));
234+ self.render();
235+ }
225236 "initialized" => {
226237 self.editor.set_status("Debugged application started".to_owned());
227238 self.render();