Skip to content

Commit b4789e5

Browse files
committed
协作和0.0的bug
1 parent 3eb11f8 commit b4789e5

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/controllers/server.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,14 @@ const server = {
706706
file["column"] += len;
707707

708708
for(let i = 0; i < data.length; i++){
709-
data[i].splice(st_i, 0, addData[i]);
709+
// data[i].splice(st_i, 0, addData[i]);
710+
711+
// 备注:区分插入的位置(可能是左侧插入或者右侧插入)
712+
if(direction == "lefttop"){
713+
data[i].splice(st_i, 0, addData[i]);
714+
}else{
715+
data[i].splice(st_i + 1, 0, addData[i]);
716+
}
710717
}
711718
}
712719

src/global/format.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,8 +1353,16 @@ var make_ssf = function make_ssf(SSF) {
13531353
}
13541354
// var retval = "";
13551355
var retval = tempV === 0 ? "0" : "";
1356-
for (i = 0; i !== out.length; ++i)
1357-
if (out[i] != null) retval += out[i].v;
1356+
// for (i = 0; i !== out.length; ++i)
1357+
// if (out[i] != null) retval += out[i].v;
1358+
for (i = 0; i !== out.length; ++i){
1359+
if (out[i] != null && out[i].v.startsWith(".")){
1360+
retval += out[i].v;
1361+
}else{
1362+
retval = out[i].v || retval;
1363+
}
1364+
}
1365+
13581366
return retval;
13591367
}
13601368
SSF._eval = eval_fmt;

0 commit comments

Comments
 (0)