Skip to content
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

[Bug] 粘贴的内容包括换行时会使消息自动发送 #175

Open
NikoCat233 opened this issue Dec 22, 2023 · 3 comments
Open

[Bug] 粘贴的内容包括换行时会使消息自动发送 #175

NikoCat233 opened this issue Dec 22, 2023 · 3 comments
Assignees
Labels

Comments

@NikoCat233
Copy link
Contributor

NikoCat233 commented Dec 22, 2023

抄你的码字结果把bug抄过来了
粘贴换行符会使消息直接发送

似乎没有必要去patch textbox,直接在chatcontrol里面写就行了

在tohe的pr里我删掉了textbox patch
将修改字数限制和字符替换移到了chatcontroler里面,并且替换换行符为空格,检查粘贴的字数是否超过了字符上限
__instance.allowpaste看起来也没什么用,crtl+v已经实现了,字数多了带换行符 textbox 和 chatcontroller会settext连着发2次消息极为逆天

https://github.com/0xDrMoe/TownofHost-Enhanced/pull/368/files

@KARPED1EM KARPED1EM self-assigned this Dec 22, 2023
@KARPED1EM KARPED1EM added the Bug label Dec 22, 2023
@Slok7565
Copy link
Contributor

换行在aus里边就是发送,总不能强制改成\n吧)

@KARPED1EM
Copy link
Owner

换行在aus里边就是发送,总不能强制改成\n吧)

\n 就是换行

@NikoCat233
Copy link
Contributor Author

替换成空格了
doge

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