[GH-ISSUE #4031] 设置关键字的高亮问题 #2791

Open
opened 2026-02-27 00:54:16 +03:00 by kerem · 2 comments
Owner

Originally created by @sz274071580 on GitHub (Aug 19, 2025).
Original GitHub issue: https://github.com/electerm/electerm/issues/4031

Electerm Version and download file extension(Electerm版本和下载文件后缀)

electerm-1.91.1-win-x64-installer.exe

Platform detail (平台详情)

arch:"x64" availableParallelism:12 cpus: [ { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 6094000, "nice": 0, "sys": 8509656, "idle": 152897062, "irq": 1485937 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3389187, "nice": 0, "sys": 2436015, "idle": 161675468, "irq": 188062 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 11890859, "nice": 0, "sys": 7728078, "idle": 147881734, "irq": 501500 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 5340765, "nice": 0, "sys": 3085500, "idle": 159074406, "irq": 217859 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 8515453, "nice": 0, "sys": 7038156, "idle": 151947062, "irq": 419015 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 4255296, "nice": 0, "sys": 6989468, "idle": 156255906, "irq": 347250 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 8003500, "nice": 0, "sys": 6832953, "idle": 152664218, "irq": 389000 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3170312, "nice": 0, "sys": 5436093, "idle": 158894265, "irq": 263937 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 4898281, "nice": 0, "sys": 4901687, "idle": 157700703, "irq": 381875 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 2874578, "nice": 0, "sys": 3740484, "idle": 160885609, "irq": 309093 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 6806265, "nice": 0, "sys": 5001218, "idle": 155693187, "irq": 271140 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3091156, "nice": 0, "sys": 3764296, "idle": 160645218, "irq": 260781 } } ] endianness:"LE" freemem:21404229632 homedir:"C:\Users\Administrator" hostname:"DESKTOP-EVLIQKK" loadavg:[ 0, 0, 0 ] networkInterfaces: { "VMware Network Adapter VMnet1": [ { "address": "fe80::9bbe:83f6:6bf7:b078", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "00:50:56:c0:00:01", "internal": false, "cidr": "fe80::9bbe:83f6:6bf7:b078/64", "scopeid": 3 }, { "address": "169.254.93.209", "netmask": "255.255.0.0", "family": "IPv4", "mac": "00:50:56:c0:00:01", "internal": false, "cidr": "169.254.93.209/16" } ], "VMware Network Adapter VMnet8": [ { "address": "fe80::4e2:7669:8cda:f8e9", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "00:50:56:c0:00:08", "internal": false, "cidr": "fe80::4e2:7669:8cda:f8e9/64", "scopeid": 13 }, { "address": "169.254.237.16", "netmask": "255.255.0.0", "family": "IPv4", "mac": "00:50:56:c0:00:08", "internal": false, "cidr": "169.254.237.16/16" } ], "WLAN": [ { "address": "2409:8a15:3067:6750:2ff1:ef0:3798:84c6", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "2409:8a15:3067:6750:2ff1:ef0:3798:84c6/64", "scopeid": 0 }, { "address": "2409:8a15:3067:6750:d4bb:f6ec:900c:547f", "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "2409:8a15:3067:6750:d4bb:f6ec:900c:547f/128", "scopeid": 0 }, { "address": "fe80::33e8:33e0:37d8:1558", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "fe80::33e8:33e0:37d8:1558/64", "scopeid": 11 }, { "address": "192.168.1.7", "netmask": "255.255.255.0", "family": "IPv4", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "192.168.1.7/24" } ], "Loopback Pseudo-Interface 1": [ { "address": "::1", "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "family": "IPv6", "mac": "00:00:00:00:00:00", "internal": true, "cidr": "::1/128", "scopeid": 0 }, { "address": "127.0.0.1", "netmask": "255.0.0.0", "family": "IPv4", "mac": "00:00:00:00:00:00", "internal": true, "cidr": "127.0.0.1/8" } ] } platform:"win32" release:"10.0.26100" tmpdir: "C:\Users\ADMINI~1\AppData\Local\Temp" totalmem:34144022528 type:"Windows_NT" userInfo: { "uid": -1, "gid": -1, "username": "Administrator", "homedir": "C:\Users\Administrator", "shell": null } uptime:492751.906 version:"Windows 11 Pro" machine:"x86_64"

What steps will reproduce the bug?(重现问题的详细步骤)

我设置了高亮,如图:
Image

切到控制台中会发现第一次的显示[?1034h[root@xysoftware ~],效果如下:
Image
回车后恢复正常显示[root@xysoftware ~]

What should have happened?(期望的结果)

期望第一次的控制台显示为[root@xysoftware ~]效果:
Image

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

No response

Additional information(其他任何相关信息)

No response

Originally created by @sz274071580 on GitHub (Aug 19, 2025). Original GitHub issue: https://github.com/electerm/electerm/issues/4031 ### Electerm Version and download file extension(Electerm版本和下载文件后缀) electerm-1.91.1-win-x64-installer.exe ### Platform detail (平台详情) arch:"x64" availableParallelism:12 cpus: [ { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 6094000, "nice": 0, "sys": 8509656, "idle": 152897062, "irq": 1485937 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3389187, "nice": 0, "sys": 2436015, "idle": 161675468, "irq": 188062 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 11890859, "nice": 0, "sys": 7728078, "idle": 147881734, "irq": 501500 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 5340765, "nice": 0, "sys": 3085500, "idle": 159074406, "irq": 217859 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 8515453, "nice": 0, "sys": 7038156, "idle": 151947062, "irq": 419015 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 4255296, "nice": 0, "sys": 6989468, "idle": 156255906, "irq": 347250 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 8003500, "nice": 0, "sys": 6832953, "idle": 152664218, "irq": 389000 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3170312, "nice": 0, "sys": 5436093, "idle": 158894265, "irq": 263937 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 4898281, "nice": 0, "sys": 4901687, "idle": 157700703, "irq": 381875 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 2874578, "nice": 0, "sys": 3740484, "idle": 160885609, "irq": 309093 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 6806265, "nice": 0, "sys": 5001218, "idle": 155693187, "irq": 271140 } }, { "model": "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz", "speed": 2208, "times": { "user": 3091156, "nice": 0, "sys": 3764296, "idle": 160645218, "irq": 260781 } } ] endianness:"LE" freemem:21404229632 homedir:"C:\\Users\\Administrator" hostname:"DESKTOP-EVLIQKK" loadavg:[ 0, 0, 0 ] networkInterfaces: { "VMware Network Adapter VMnet1": [ { "address": "fe80::9bbe:83f6:6bf7:b078", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "00:50:56:c0:00:01", "internal": false, "cidr": "fe80::9bbe:83f6:6bf7:b078/64", "scopeid": 3 }, { "address": "169.254.93.209", "netmask": "255.255.0.0", "family": "IPv4", "mac": "00:50:56:c0:00:01", "internal": false, "cidr": "169.254.93.209/16" } ], "VMware Network Adapter VMnet8": [ { "address": "fe80::4e2:7669:8cda:f8e9", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "00:50:56:c0:00:08", "internal": false, "cidr": "fe80::4e2:7669:8cda:f8e9/64", "scopeid": 13 }, { "address": "169.254.237.16", "netmask": "255.255.0.0", "family": "IPv4", "mac": "00:50:56:c0:00:08", "internal": false, "cidr": "169.254.237.16/16" } ], "WLAN": [ { "address": "2409:8a15:3067:6750:2ff1:ef0:3798:84c6", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "2409:8a15:3067:6750:2ff1:ef0:3798:84c6/64", "scopeid": 0 }, { "address": "2409:8a15:3067:6750:d4bb:f6ec:900c:547f", "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "2409:8a15:3067:6750:d4bb:f6ec:900c:547f/128", "scopeid": 0 }, { "address": "fe80::33e8:33e0:37d8:1558", "netmask": "ffff:ffff:ffff:ffff::", "family": "IPv6", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "fe80::33e8:33e0:37d8:1558/64", "scopeid": 11 }, { "address": "192.168.1.7", "netmask": "255.255.255.0", "family": "IPv4", "mac": "b4:6b:fc:da:a7:aa", "internal": false, "cidr": "192.168.1.7/24" } ], "Loopback Pseudo-Interface 1": [ { "address": "::1", "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "family": "IPv6", "mac": "00:00:00:00:00:00", "internal": true, "cidr": "::1/128", "scopeid": 0 }, { "address": "127.0.0.1", "netmask": "255.0.0.0", "family": "IPv4", "mac": "00:00:00:00:00:00", "internal": true, "cidr": "127.0.0.1/8" } ] } platform:"win32" release:"10.0.26100" tmpdir: "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp" totalmem:34144022528 type:"Windows_NT" userInfo: { "uid": -1, "gid": -1, "username": "Administrator", "homedir": "C:\\Users\\Administrator", "shell": null } uptime:492751.906 version:"Windows 11 Pro" machine:"x86_64" ### What steps will reproduce the bug?(重现问题的详细步骤) 我设置了高亮,如图: <img width="1254" height="653" alt="Image" src="https://github.com/user-attachments/assets/b02ee34c-f2b4-467a-969e-7d19418bd98f" /> 切到控制台中会发现第一次的显示[?1034h[root@xysoftware ~],效果如下: <img width="730" height="427" alt="Image" src="https://github.com/user-attachments/assets/e24e0ee5-6544-45f7-9eef-570f77c29576" /> 回车后恢复正常显示[root@xysoftware ~] ### What should have happened?(期望的结果) 期望第一次的控制台显示为[root@xysoftware ~]效果: <img width="319" height="120" alt="Image" src="https://github.com/user-attachments/assets/8fd45912-1159-4f0e-aca4-49d187aeb723" /> ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) _No response_ ### Additional information(其他任何相关信息) _No response_
Author
Owner

@zxdong262 commented on GitHub (Aug 19, 2025):

你让AI重新写个正则试试,可能.+太宽泛了

<!-- gh-comment-id:3199147604 --> @zxdong262 commented on GitHub (Aug 19, 2025): 你让AI重新写个正则试试,可能.+太宽泛了
Author
Owner

@sz274071580 commented on GitHub (Aug 20, 2025):

你让AI重新写个正则试试,可能.+太宽泛了

写了好几个正则,就这个最靠谱

看看这种写法更离谱

Image Image
<!-- gh-comment-id:3206667379 --> @sz274071580 commented on GitHub (Aug 20, 2025): > 你让AI重新写个正则试试,可能.+太宽泛了 写了好几个正则,就这个最靠谱 看看这种写法更离谱 <img width="1255" height="701" alt="Image" src="https://github.com/user-attachments/assets/a9bbdc8f-63c9-4cc3-aa5b-d37e71656839" /> <img width="742" height="367" alt="Image" src="https://github.com/user-attachments/assets/15261519-475f-43ae-85c5-747194cfb7ba" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#2791
No description provided.