Skip to content

Undo exception after Delete in the last line of the code block #11362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThemanRonin opened this issue May 12, 2024 · 3 comments
Closed

Undo exception after Delete in the last line of the code block #11362

ThemanRonin opened this issue May 12, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@ThemanRonin
Copy link

ThemanRonin commented May 12, 2024

done

@ThemanRonin
Copy link
Author

ThemanRonin commented May 12, 2024

20240512132939-34v3142.zip

弄了一个可以100%复现的sy文件,步骤如下
1,在代码块中,光标放在最后,也就是【设置为0则为不提醒(静默模式)。】最后面,按del键 一次
2,手动删除代码块和第一段有文本的段落块之间的空的段落块,应该有2个,一个是大的一个是小的
3,再次到代码块中,光标放在最后,也就是【设置为0则为不提醒(静默模式)。】最后面,按del键 一次,此时应该会删除掉【// syncPath:.....】的【第一个/】
4,此时按ctrl+z ,有文本的那个段落块所有内容直接变成undefined ,并且没有任何办法恢复,【文件历史】里面也无法恢复

ps: 第3步 在代码块中最后一段按del能删除下面段落块的内容,这一部分也有问题。
理论情况下,在代码块的最后按del,是不会删除掉下面的存在的段落文本的,(但是我视频中会出现这个问题,所以这个问题可能就是导致的ctrl+z之后段落块变成了undefined?)。

@ThemanRonin ThemanRonin changed the title 部分场景下低概率恶性bug 段落块出现undefined 部分场景下低概率恶性bug 段落块出现undefined 【视频、log、可复现的sy文件】 May 12, 2024
@ThemanRonin ThemanRonin changed the title 部分场景下低概率恶性bug 段落块出现undefined 【视频、log、可复现的sy文件】 部分场景下恶性bug 段落块数据丢失,变成undefined 【视频、log、可复现的sy文件】 May 12, 2024
@ThemanRonin
Copy link
Author

20240512132939-34v3142.zip

又操作了一次,这次复现太简单了,只要在【设置为0则为不提醒(静默模式)。】后面按下del键后,会删除掉【lastModifiedDeltaSeconds】的【l】,然后按下ctrl+z。下面这整个的段落块直接变为undefined

下面是log
siyuan.log

@ThemanRonin ThemanRonin changed the title 部分场景下恶性bug 段落块数据丢失,变成undefined 【视频、log、可复现的sy文件】 部分场景下恶性bug 段落块数据丢失,变成undefined 【复现视频、log、可复现的sy文件】 May 12, 2024
@ThemanRonin
Copy link
Author

2024-5-12 17:28更新
折腾了一番发现段落块变成undefined之后数据并没有丢失
把显示模式切换成:导出预览 之后就可以正常显示undefined的文本了,再次切换到所见所得也是正常的。
但是这个也太吓人了,要是正常记录一大段东西突然出现这个情况谁也遭不住啊...........麻烦作者看看到底是个什么问题

@88250 88250 changed the title 部分场景下恶性bug 段落块数据丢失,变成undefined 【复现视频、log、可复现的sy文件】 Undo exception after Delete in the last line of the code block May 12, 2024
@88250 88250 added the Bug label May 12, 2024
@88250 88250 added this to the 3.0.14 milestone May 12, 2024
Vanessa219 added a commit that referenced this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants