diff options
author | ath3 | 2023-12-19 01:17:12 +0000 |
---|---|---|
committer | GitHub | 2023-12-19 01:17:12 +0000 |
commit | 9ba691cd3a8ffb021cb194bd3185317a65c3194a (patch) | |
tree | 915ecd2d667ad492317e1a1748c2ba6f57983bcb /helix-term/src/commands/dap.rs | |
parent | 06d7dc628e5a5dac9bbfe4802c3b00754a9f7731 (diff) |
Support drawing popup frame (#4313)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Diffstat (limited to 'helix-term/src/commands/dap.rs')
-rw-r--r-- | helix-term/src/commands/dap.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index cc013d1e..e9fde476 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -8,7 +8,7 @@ use dap::{StackFrame, Thread, ThreadStates}; use helix_core::syntax::{DebugArgumentValue, DebugConfigCompletion, DebugTemplate}; use helix_dap::{self as dap, Client}; use helix_lsp::block_on; -use helix_view::editor::Breakpoint; +use helix_view::{editor::Breakpoint, graphics::Margin}; use serde_json::{to_value, Value}; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -581,7 +581,12 @@ pub fn dap_variables(cx: &mut Context) { } let contents = Text::from(tui::text::Text::from(variables)); - let popup = Popup::new("dap-variables", contents); + let margin = if cx.editor.popup_border() { + Margin::all(1) + } else { + Margin::none() + }; + let popup = Popup::new("dap-variables", contents).margin(margin); cx.replace_or_push_layer("dap-variables", popup); } |