IDEA中搜索文件内容的预览窗口不显示完整的内容(不是搜索结果的条数被限制了,是单条的搜索结果的预览)

背景

IDEA 中搜索配置问题,有两个大坑,第一个是之前有提到过的,搜索结果如果超过100的话100外的结果不会显示(可以改)。第二个坑就是显示的不完整,以搜索properties配置为例,如

if.longer.than.200.will.not.display.full=/user/foo/{userId}/pets/{petId}/property/{propertyId}/account/{accountId}/bills/{billId}/foo/bar/example/chunk/retain/filter_out/fell_free/disconnect/history/{historyId}

配置包括key在内,如果字符数 >200 则会发生截断现象。上述配置210个chars,可以看到预览的时候截断到 /example。

截断的位置也比较奇怪,不是substring(0,200)的逻辑,这个预览到了/example就结束了,很容易让人误以为endpoint到了/example就结束了
在这里插入图片描述

if.longer.than.200.will.not.display.full=/user/foo/{userId}/pets/{petId}/property/{propertyId}/account/{accountId}/bills/{billId}/foo/bar/example/chunk/retain/filter_out/fell_free/disconnect/history/{

上述刚好是200字符,可以完整展示,多个字符就不行了,少个字符可以完整展示。说明200就是边界
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

解决办法

暂时还未找到 IDEA 里哪里可以设置。如有知道的请留言。

猜你喜欢

转载自blog.csdn.net/w8y56f/article/details/131304508