Skip to content

Commit

Permalink
搜索结果索引计数为 0 时点击「上一个」,计数会从末尾开始
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Mar 26, 2024
1 parent ee262db commit 36cd606
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

- 适配其他主题和插件,不再被覆盖
- 高亮结果文本滚动到页面中央
- 搜索结果索引计数为 0 时点击「上一个」,计数会从末尾开始

修复:

- 自动重置搜索结果索引计数为 0
- 只搜索在文档区域内的文本
- 只搜索在文档区域内的文本(不包含界面和文档标题)
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-plugin-hsr-mdzz2048-fork",
"author": "TCOTC",
"url": "https://github.com/TCOTC/siyuan-plugin-hsr-mdzz2048-fork",
"version": "0.0.4",
"version": "0.0.5",
"minAppVersion": "2.9.8",
"backends": ["windows", "linux", "darwin"],
"frontends": ["desktop", "browser-desktop"],
Expand Down
3 changes: 3 additions & 0 deletions src/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function clickLast() {
if (resultIndex.value > 1) {
resultIndex.value = resultIndex.value - 1
}
else if (resultIndex.value < 1) {
resultIndex.value = resultCount.value
}
scroollIntoRanges(resultIndex.value -1)
}
function clickNext() {
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"insertEmoji": "Insert Emoji",
"removeSpace": "Remove Space",
"topBarTitle": "Highlight search",
"search": "Search",
"search": "press Enter to search",
"back": "Back",
"forward": "Forward",
"close": "Close"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"insertEmoji": "插入表情",
"removeSpace": "移除空格",
"topBarTitle": "文档高亮搜索",
"search": "搜索",
"search": "按下 Enter 搜索",
"back": "上一个",
"forward": "下一个",
"close": "关闭"
Expand Down

0 comments on commit 36cd606

Please sign in to comment.