mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
d8caaa76e4
commit
ae60245014
2 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ import {
|
||||||
import {getPreviousHeading} from "../protyle/wysiwyg/getBlock";
|
import {getPreviousHeading} from "../protyle/wysiwyg/getBlock";
|
||||||
import {lockFile, setTitle} from "../dialog/processSystem";
|
import {lockFile, setTitle} from "../dialog/processSystem";
|
||||||
import {zoomOut} from "../menus/protyle";
|
import {zoomOut} from "../menus/protyle";
|
||||||
|
import {countBlockWord, countSelectWord} from "../layout/status";
|
||||||
|
|
||||||
export const openFileById = (options: {
|
export const openFileById = (options: {
|
||||||
id: string,
|
id: string,
|
||||||
|
|
@ -315,6 +316,7 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackSt
|
||||||
if (focus) {
|
if (focus) {
|
||||||
if (protyle.toolbar.range) {
|
if (protyle.toolbar.range) {
|
||||||
focusByRange(protyle.toolbar.range);
|
focusByRange(protyle.toolbar.range);
|
||||||
|
countSelectWord(protyle.toolbar.range);
|
||||||
if (pushBackStack && protyle.preview.element.classList.contains("fn__none")) {
|
if (pushBackStack && protyle.preview.element.classList.contains("fn__none")) {
|
||||||
pushBack(protyle, protyle.toolbar.range);
|
pushBack(protyle, protyle.toolbar.range);
|
||||||
}
|
}
|
||||||
|
|
@ -323,6 +325,8 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackSt
|
||||||
if (pushBackStack && protyle.preview.element.classList.contains("fn__none")) {
|
if (pushBackStack && protyle.preview.element.classList.contains("fn__none")) {
|
||||||
pushBack(protyle, undefined, protyle.wysiwyg.element.firstElementChild);
|
pushBack(protyle, undefined, protyle.wysiwyg.element.firstElementChild);
|
||||||
}
|
}
|
||||||
|
// 用于清空状态栏字数统计
|
||||||
|
countBlockWord([]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (window.siyuan.config.fileTree.alwaysSelectOpenedFile && protyle) {
|
if (window.siyuan.config.fileTree.alwaysSelectOpenedFile && protyle) {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import {scrollCenter} from "../util/highlightById";
|
||||||
import {getAllModels} from "./getAll";
|
import {getAllModels} from "./getAll";
|
||||||
import {fetchPost} from "../util/fetch";
|
import {fetchPost} from "../util/fetch";
|
||||||
import {onGet} from "../protyle/util/onGet";
|
import {onGet} from "../protyle/util/onGet";
|
||||||
|
import {countBlockWord} from "./status";
|
||||||
|
|
||||||
export class Wnd {
|
export class Wnd {
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
@ -460,6 +461,7 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
model.editor.destroy();
|
model.editor.destroy();
|
||||||
|
countBlockWord([]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (model instanceof Search) {
|
if (model instanceof Search) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue