Skip to content

Abnormal behavior after customizing the shortcut key for inserting a code block on Windows #9735

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
3 tasks done
heheda123123 opened this issue Nov 24, 2023 · 4 comments
Closed
3 tasks done
Assignees
Labels
Milestone

Comments

@heheda123123
Copy link

heheda123123 commented Nov 24, 2023

自定义插入代码块快捷键后行为异常

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

C-d 原本是重复的快捷键,把他去掉
把C-d设置到插入代码块上

比如如下的三行文本

aaaaaa
bbbbbb

cccccc

会有以下的异常情况(就是最近几个版本才有的,以前用着很正常)
1 把光标放到aaaaaa的末尾,按C-d,bbbbbb会退格到第一行去变成这样

aaaaaabbbbbb

cccccc

2 在第三行空白按C-d 的话,cccccc会跑到第三行变成如下这样

aaaaaa
bbbbbb
cccccc

只有在后面没有任何文本的情况下按C-d才会插入一个代码块。不过奇怪的是,我用原生快捷键,或者设置一个其他的快捷键,比如alt-d,也没有这个问题

Expected result

1 当前行有内容的时候,按 C-d 创建代码块,插入当前行的内容
2 当前行是空行的时候,按 C-d 创建代码块到当前行

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.10.16
- Operating System: windows 11
- Browser (if used):

Log file

应该不用log

More information

No response

@Vanessa219
Copy link
Member

是这样操作么?

QQ20231124-211731-HD.mp4

@heheda123123
Copy link
Author

heheda123123 commented Nov 24, 2023

好像播放不了,可以下载播放,或者看下你qq哈
https://github.com/siyuan-note/siyuan/assets/97490782/5b59321c-dc9d-41fe-909f-658ad2a3af9d

@heheda123123
Copy link
Author

heheda123123 commented Nov 24, 2023

不过我注意了下,你的视频里,文本都是在一个块内,我测了下你这样操作是没问题的
我上面提到的,文本都在不同的块内,换行没按shift

@88250 88250 changed the title 自定义插入代码块快捷键后行为异常 Abnormal behavior after customizing the shortcut key for inserting a code block on Windows Nov 24, 2023
@88250 88250 added the Bug label Nov 24, 2023
@88250 88250 added this to the 2.11.0 milestone Nov 24, 2023
@88250
Copy link
Member

88250 commented Nov 24, 2023

我这里 Windows 可以重现了,感谢反馈。

@88250 88250 closed this as completed Nov 25, 2023
88250 pushed a commit that referenced this issue Nov 25, 2023

Verified

This commit was signed with the committer’s verified signature.
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