Skip to content

Commit 7d0491f

Browse files
authored
Merge b2cc6c8 into de18dc1
2 parents de18dc1 + b2cc6c8 commit 7d0491f

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#A part of NonVisual Desktop Access (NVDA)
2+
#Copyright (C) 2020 NV Access Limited, Leonard de Ruijter
3+
#This file is covered by the GNU General Public License.
4+
#See the file COPYING for more details.
5+
6+
""" App module for Visual Studio Code Insiders.
7+
This app module simply inherrits from the app module for the stable version of Code.
8+
"""
9+
10+
from .code import *

source/appModules/code.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#A part of NonVisual Desktop Access (NVDA)
2+
#Copyright (C) 2020 NV Access Limited, Leonard de Ruijter
3+
#This file is covered by the GNU General Public License.
4+
#See the file COPYING for more details.
5+
6+
""" App module for Visual Studio Code.
7+
"""
8+
9+
import appModuleHandler
10+
from NVDAObjects.IAccessible.chromium import Document
11+
from NVDAObjects import NVDAObject
12+
13+
14+
class VSCodeDocument(Document):
15+
"""The only content in the root document node of Visual Studio code is the application object.
16+
Creating a tree interceptor on this object causes a major slow down of Code.
17+
Therefore, forcefully block tree interceptor creation.
18+
"""
19+
_get_treeInterceptorClass = NVDAObject._get_treeInterceptorClass
20+
21+
22+
class AppModule(appModuleHandler.AppModule):
23+
24+
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
25+
if Document in clsList and obj.IA2Attributes.get("tag") == "#document":
26+
clsList.insert(0, VSCodeDocument)

0 commit comments

Comments
 (0)