mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 19:18:06 +01:00
This commit is contained in:
parent
a5363fa0b4
commit
5c87b0cd7f
9 changed files with 306 additions and 243 deletions
|
|
@ -10,13 +10,14 @@ import {App} from "../../index";
|
|||
import {Dialog} from "../../dialog";
|
||||
import {getAllModels} from "../../layout/getAll";
|
||||
import {hasClosestByClassName} from "../../protyle/util/hasClosest";
|
||||
import {getArticle, inputEvent, replace, toggleReplaceHistory, toggleSearchHistory} from "../../search/util";
|
||||
import {getArticle, inputEvent, replace} from "../../search/util";
|
||||
import {showFileInFolder} from "../../util/pathName";
|
||||
import {assetInputEvent, renderPreview, toggleAssetHistory} from "../../search/assets";
|
||||
import {assetInputEvent, renderPreview} from "../../search/assets";
|
||||
import {initSearchMenu} from "../../menus/search";
|
||||
import {writeText} from "../../protyle/util/compatibility";
|
||||
import {checkFold} from "../../util/noRelyPCFunction";
|
||||
import {getUnRefList} from "../../search/unRef";
|
||||
import {toggleAssetHistory, toggleReplaceHistory, toggleSearchHistory} from "../../search/toggleHistory";
|
||||
|
||||
export const searchKeydown = (app: App, event: KeyboardEvent) => {
|
||||
if (getSelection().rangeCount === 0) {
|
||||
|
|
@ -72,7 +73,7 @@ export const searchKeydown = (app: App, event: KeyboardEvent) => {
|
|||
toggleAssetHistory(assetsElement);
|
||||
} else if (searchType === "doc") {
|
||||
if (targetId === "replaceInput") {
|
||||
toggleReplaceHistory(element);
|
||||
toggleReplaceHistory(element.querySelector("#replaceInput"));
|
||||
} else {
|
||||
toggleSearchHistory(element, config, edit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue