mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10: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 {lockFile, setTitle} from "../dialog/processSystem";
|
||||
import {zoomOut} from "../menus/protyle";
|
||||
import {countBlockWord, countSelectWord} from "../layout/status";
|
||||
|
||||
export const openFileById = (options: {
|
||||
id: string,
|
||||
|
|
@ -315,6 +316,7 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackSt
|
|||
if (focus) {
|
||||
if (protyle.toolbar.range) {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
countSelectWord(protyle.toolbar.range);
|
||||
if (pushBackStack && protyle.preview.element.classList.contains("fn__none")) {
|
||||
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")) {
|
||||
pushBack(protyle, undefined, protyle.wysiwyg.element.firstElementChild);
|
||||
}
|
||||
// 用于清空状态栏字数统计
|
||||
countBlockWord([]);
|
||||
}
|
||||
}
|
||||
if (window.siyuan.config.fileTree.alwaysSelectOpenedFile && protyle) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {scrollCenter} from "../util/highlightById";
|
|||
import {getAllModels} from "./getAll";
|
||||
import {fetchPost} from "../util/fetch";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
import {countBlockWord} from "./status";
|
||||
|
||||
export class Wnd {
|
||||
public id: string;
|
||||
|
|
@ -460,6 +461,7 @@ export class Wnd {
|
|||
}
|
||||
});
|
||||
model.editor.destroy();
|
||||
countBlockWord([]);
|
||||
return;
|
||||
}
|
||||
if (model instanceof Search) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue