Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有时一片空白,需要手动开关大纲会再次出现 #69

Open
sinlatansen opened this issue May 22, 2024 · 2 comments · May be fixed by #77
Open

有时一片空白,需要手动开关大纲会再次出现 #69

sinlatansen opened this issue May 22, 2024 · 2 comments · May be fixed by #77

Comments

@sinlatansen
Copy link

sinlatansen commented May 22, 2024

描述Bug
我使用这个插件编辑C语言工程,我习惯把他放在vscode左侧栏。
如果我打开左侧栏,我切换标签页,他也能正常切换。
但是如果我关闭左侧栏,此时我切换标签页,再打开左侧栏,就会一片空白,需要手动点击大纲,才可以再次出现内容

复现
关闭最侧栏,切换标签页,打开左侧栏,空白。

期望表现

截屏/录屏

OutlineMapIssue.mp4

信息

  • VSCode Version* : 1.87.2

  • Outline-map Version* : v1.4.0

  • 相关文件 : [eg: github.com/......]
    -相关插件: [eg: vue.volar]

  • 扩展设置:

附加信息

@ncbbcc
Copy link

ncbbcc commented Sep 13, 2024

我也出现了,先切到其他tab(比如资源管理器),再切换文件,再切到outline map会出现空白的情况。切换outline map的显示隐藏或者切换文件,可以恢复

@joshua-dean
Copy link
Contributor

I think I've deduced the issue.

When OutlineView.view is hidden, the Webview can't receive messages.
From the Webview API Docs:

Messages are only delivered if the webview is live

So, if you switch tab while the view is hidden, it doesn't receive the update messages, but OutlineView thinks it has. On the next update (OutlineView.view.onDidChangeVisibility), the Patcher doesn't think there's any new messages to send.

Fix is to not perform updates when the view isn't visible: joshua-dean@feea123

I will open a PR shortly.

@joshua-dean joshua-dean linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants