fix •file in REPL
This commit is contained in:
parent
cdc363c94f
commit
c192125a9c
@ -9,7 +9,7 @@ static bool init = false;
|
||||
static void repl_init() {
|
||||
if (init) return;
|
||||
cbqn_init();
|
||||
replPath = emptyCVec(); gc_add(replPath);
|
||||
replPath = m_str32(U"."); gc_add(replPath);
|
||||
Block* initBlock = bqn_comp(m_str32(U"\"(REPL initializer)\""), inc(replPath), m_f64(0));
|
||||
gsc = m_scope(initBlock->body, NULL, 0, 0, NULL); gc_add(tag(gsc,OBJ_TAG));
|
||||
ptr_dec(initBlock);
|
||||
|
||||
2
src/vm.c
2
src/vm.c
@ -845,7 +845,7 @@ NOINLINE B vm_fmtPoint(B src, B prepend, B path, usz cs, usz ce) { // consumes p
|
||||
i64 ln = 1;
|
||||
for (usz i = 0; i < srcS; i++) if(o2cu(srcGetU(src, i))=='\n') ln++;
|
||||
B s = prepend;
|
||||
if (isArr(path) && a(path)->ia>0) AFMT("%R:%l:\n ", path, ln);
|
||||
if (isArr(path) && (a(path)->ia>1 || (a(path)->ia==1 && TI(path,getU)(path,0).u!=m_c32('.').u))) AFMT("%R:%l:\n ", path, ln);
|
||||
else AFMT("at ");
|
||||
i64 padEnd = (i64)a(s)->ia;
|
||||
i64 padStart = padEnd;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user