File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/repl Expand file tree Collapse file tree 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],
196196 state.copy(context = run.runContext)
197197 }
198198
199+ private def stripBackTicks (label : String ) =
200+ if label.startsWith(" `" ) && label.endsWith(" `" ) then
201+ label.drop(1 ).dropRight(1 )
202+ else
203+ label
204+
199205 /** Extract possible completions at the index of `cursor` in `expr` */
200206 protected final def completions (cursor : Int , expr : String , state0 : State ): List [Candidate ] = {
201207 def makeCandidate (label : String ) = {
202208
203209 new Candidate (
204210 /* value = */ label,
205- /* displ = */ label, // displayed value
211+ /* displ = */ stripBackTicks( label) , // displayed value
206212 /* group = */ null , // can be used to group completions together
207213 /* descr = */ null , // TODO use for documentation?
208214 /* suffix = */ null ,
You can’t perform that action at this time.
0 commit comments