File tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/repl
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -196,13 +196,19 @@ class ReplDriver(settings: Array[String],
196
196
state.copy(context = run.runContext)
197
197
}
198
198
199
+ private def stripBackTicks (label : String ) =
200
+ if label.startsWith(" `" ) && label.endsWith(" `" ) then
201
+ label.drop(1 ).dropRight(1 )
202
+ else
203
+ label
204
+
199
205
/** Extract possible completions at the index of `cursor` in `expr` */
200
206
protected final def completions (cursor : Int , expr : String , state0 : State ): List [Candidate ] = {
201
207
def makeCandidate (label : String ) = {
202
208
203
209
new Candidate (
204
210
/* value = */ label,
205
- /* displ = */ label, // displayed value
211
+ /* displ = */ stripBackTicks( label) , // displayed value
206
212
/* group = */ null , // can be used to group completions together
207
213
/* descr = */ null , // TODO use for documentation?
208
214
/* suffix = */ null ,
You can’t perform that action at this time.
0 commit comments