File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
lsp/completions/sources/composite Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ pub struct RMain {
259
259
/// Current topmost environment on the stack while waiting for input in the
260
260
/// debugger. This is `Some()` only when R is idle and in a `browser()`
261
261
/// prompt.
262
- pub ( crate ) debug_env : Option < RObject > ,
262
+ debug_env : Option < RObject > ,
263
263
}
264
264
265
265
/// Represents the currently active execution request from the frontend. It
@@ -2072,6 +2072,11 @@ impl RMain {
2072
2072
StdInRpcReply :: Interrupt => Ok ( RObject :: null ( ) ) ,
2073
2073
}
2074
2074
}
2075
+
2076
+ #[ cfg( not( test) ) ] // Avoid warnings in unit test
2077
+ pub ( crate ) fn debug_env ( & self ) -> Option < RObject > {
2078
+ self . debug_env . clone ( )
2079
+ }
2075
2080
}
2076
2081
2077
2082
/// Report an incomplete request to the frontend
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ fn completions_from_search_path(
65
65
#[ cfg( not( test) ) ] // Unit tests do not have an `RMain`
66
66
{
67
67
use crate :: interface:: RMain ;
68
- if let Some ( debug_env) = & RMain :: get ( ) . debug_env {
68
+ if let Some ( debug_env) = & RMain :: get ( ) . debug_env ( ) {
69
69
// Mem-Safety: Object protected by `RMain` for the duration of the `r_task()`
70
70
env = debug_env. sexp ;
71
71
}
You can’t perform that action at this time.
0 commit comments