internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: nvaccess/nvda

Issue:
VS Code: Reduce the number of times one has to use NVDA+Space to switch modes.
I just filed [this issue](https://github.com/microsoft/vscode/issues/93087) against VS Code where I suggest to use targeted role="document" in those places that produce HTML output for consumption, to make NVDA switch in and out of browse mode in a smart, automated, manner, reducing the number of times one has to use NVDA+Space to toggle modes. Examples I found while using the 1.44 VS Code Insider builds were:

* The Welcome page
* The details page for an extension
* The ReadMe file that may be displayed after an extension has been installed.

@leonardder suggested that, once this lands in stable, a modification might be needed for the VS Code app module. So filing this issue here.


Discussion:
Added the needs external fix label. As soon as https://github.com/microsoft/vscode/issues/93087 is addressed, we can reconsider the behavior of our appModules.
VS Code insider builds now have the fix for role="document" in some places where they make sense, and more are being added as they're discovered. I think we can reevaluate now whether the VS app module still makes sense. The Insider one can certainly be removed, the other one once VS Code 1.44 gets released.

Resolving patch:
diff --git a/source/appModules/code.py b/source/appModules/code.py
deleted file mode 100644
--- a/source/appModules/code.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#appModules/code.py
-#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2019 NV Access Limited, Babbage B.V.
-#This file is covered by the GNU General Public License.
-#See the file COPYING for more details.
-
-import appModuleHandler
-
-class AppModule(appModuleHandler.AppModule):
-	disableBrowseModeByDefault = True


Test patch:
Repository: nvaccess/nvda

Issue:
Add a shortcut for the "changes.html" to the Windows start menu program folder
### Steps to reproduce:
1. Open the start menu and list the content of the program folder.
Note: This behaviour is different between Windows 7 to Windows 10-1903.
2. Move to the folder "NVDA\Documentations\"
### Actual entries:
+ Shortcut to "userGuide.html"
+ Shortcut to "keyCommands.html"
### Expected behaviour:
Add a shortcut for the "changes.html" too.
Note: If this is already the current behaviour with NVDA 2018.4.1, which I haven't installed yet, please close this issue.
### System configuration:
#### NVDA installed/portable:
Only installed version
#### NVDA version:
2018.1
#### Windows version:
Win7 to Win10-1903


Discussion:

Resolving patch:
diff --git a/source/installer.py b/source/installer.py
--- a/source/installer.py
+++ b/source/installer.py
@@ -391,6 +391,15 @@ def _updateShortcuts(NVDAExe, installDir, shouldCreateDesktopShortcut, slaveExe,
 		prependSpecialFolder="AllUsersPrograms"
 	)
 
+	# Translators: A label for a shortcut in start menu to open NVDA what's new.
+	changesTranslated = _("What's new")
+	_createShortcutWithFallback(
+		path=os.path.join(docFolder, changesTranslated + ".lnk"),
+		fallbackPath=os.path.join(docFolder, "What's new.lnk"),
+		targetPath=getDocFilePath("changes.html", installDir),
+		prependSpecialFolder="AllUsersPrograms"
+	)
+
 
 def isDesktopShortcutInstalled():
 	wsh=_getWSH()


Test patch:
Repository: nvaccess/nvda

Issue:
Does not Speak when Deleting character by pressing shift.
While trying to delete a character when shift is pressed, the nvda does not speak anything.
It should reade the character which is getting deleted even if shift is pressed.


Discussion:
Please provide additional information, such as what editor you're using to reproduce this on what Windows version, with what version of NVDA?
I can reproduce the issue in any kind of editable text with latest alpha version of NVDA, on Windows 10 version 1809, but I don't see why @gauravahir28 would remove text this way. It's simply that `EditableText._hasCaretMoved` is not triggered when pressing shift+backspace. However, Windows still delete the text, so we are loosing a bit of information.

Resolving patch:
diff --git a/source/editableText.py b/source/editableText.py
--- a/source/editableText.py
+++ b/source/editableText.py
@@ -305,10 +305,13 @@ def script_caret_deleteWord(self, gesture):
 		"kb:control+home": "caret_moveByLine",
 		"kb:control+end": "caret_moveByLine",
 		"kb:delete": "caret_deleteCharacter",
+		"kb:shift+delete": "caret_deleteCharacter",
 		"kb:numpadDelete": "caret_deleteCharacter",
+		"kb:shift+numpadDelete": "caret_deleteCharacter",
 		"kb:control+delete": "caret_deleteWord",
 		"kb:control+numpadDelete": "caret_deleteWord",
 		"kb:backspace": "caret_backspaceCharacter",
+		"kb:shift+backspace": "caret_backspaceCharacter",
 		"kb:control+backspace": "caret_backspaceWord",
 	}
 


Test patch:
Repository: nvaccess/nvda

Issue:
Advanced settings: the value does not restore to default for certain settings when activating the restore default settings button
### Steps to reproduce:
1. Open NVDA's advanced settings
2. Change the value for all the settings in this category to a value which is not the default

### Actual behavior:
Following settings do not restore to default when activating the restore to default button:
* Use the new typed character support in Windows Console when available
* Attempt to cancel speech for expired focus events
* carret movement timeout
* debug logging items in the list

### Expected behavior:
All the settings should restore to their default value when activating the coresponding button. This is very important in my view, if for example new users activate something accidentally and forgot about it.


### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
Version: alpha-20514,e87d8ab1

#### Windows version:
Windows 10 2004 update

#### Name and version of other software in use when reproducing the issue:
n/a

#### Other information about your system:
n/a

### Other questions
#### Does the issue still occur after restarting your computer?
yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
no

#### If addons are disabled, is your problem still occuring?
yes

#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
n/a


Discussion:
cc: @codeofdusk, @feerrenrut 
I think this issue is a good candidate for a good for new dev label. For those working on it: search for `restoreToDefaults` in `source/gui/settingsDialogs.py`.

It might also be worth considering resetting these to the default on version bump, especially as feature flag defaults might change (mitigated for UIA conhost by the ternary setting in config but binary in GUI until default approach).

Resolving patch:
diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py
--- a/source/gui/settingsDialogs.py
+++ b/source/gui/settingsDialogs.py
@@ -2480,7 +2480,7 @@ def restoreToDefaults(self):
 		self.UIAInMSWordCheckBox.SetValue(self.UIAInMSWordCheckBox.defaultValue)
 		self.ConsoleUIACheckBox.SetValue(self.ConsoleUIACheckBox.defaultValue == 'UIA')
 		self.winConsoleSpeakPasswordsCheckBox.SetValue(self.winConsoleSpeakPasswordsCheckBox.defaultValue)
-		self.cancelExpiredFocusSpeechCombo.SetValue(self.cancelExpiredFocusSpeechCombo.defaultValue)
+		self.cancelExpiredFocusSpeechCombo.SetSelection(self.cancelExpiredFocusSpeechCombo.defaultValue)
 		self.keyboardSupportInLegacyCheckBox.SetValue(self.keyboardSupportInLegacyCheckBox.defaultValue)
 		self.autoFocusFocusableElementsCheckBox.SetValue(self.autoFocusFocusableElementsCheckBox.defaultValue)
 		self.caretMoveTimeoutSpinControl.SetValue(self.caretMoveTimeoutSpinControl.defaultValue)


Test patch:
Repository: nvaccess/nvda

Issue:
bug: Copying object name can add a space
Hello. I recently updated my portable copy of NVDA from 2019.2.1 to 2020.2 on my Windows10 1909 PC. I have noticed improvements and thanks for those, but also a small few bugs / niggles that I would like to ask about. This is one.

With my key binds I can press NVDA+O three times to copy an object's name and value to the clipboard, and with the older version this worked flawlessly.

However now there is at least one place where it doesn't anymore. In FileExplorer if I select a file or folder then invoke this function, it adds an erroneous trailing space to the name. Although values from the other columns such as date and size copy fine.

I use this feature extensively and so obviously would prefer to not worry about erroneous characters being added to the copied text. Hope this is a simple one to fix! Thanks.


Discussion:
cc: @JulienCochuyt 

Resolving patch:
diff --git a/source/globalCommands.py b/source/globalCommands.py
--- a/source/globalCommands.py
+++ b/source/globalCommands.py
@@ -852,7 +852,7 @@ def script_navigatorObject_current(self,gesture):
 			if curObject.TextInfo!=NVDAObjectTextInfo:
 				textList=[]
 				name = curObject.name
-				if isinstance(name, str) and not name.isspace():
+				if name and isinstance(name, str) and not name.isspace():
 					textList.append(name)
 				try:
 					info=curObject.makeTextInfo(textInfos.POSITION_SELECTION)
@@ -868,7 +868,7 @@ def script_navigatorObject_current(self,gesture):
 			else:
 				textList=[]
 				for prop in (curObject.name, curObject.value):
-					if isinstance(prop,str) and not prop.isspace():
+					if prop and isinstance(prop, str) and not prop.isspace():
 						textList.append(prop)
 			text=" ".join(textList)
 			if len(text)>0 and not text.isspace():


Test patch:
Repository: nvaccess/nvda

Issue:
Internet Information Services (IIS) Manager: error when moving through listview
### Steps to reproduce:
1. Open Internet Information Services (IIS) Manager
2. use the tree view to connect to a server and select a site.
3. Press tab until you reach the list view containing shortcuts to several feature pages.

### Actual behavior:
Traceback:

```
ERROR - eventHandler.executeEvent (11:02:12.320) - MainThread (3316):
error executing event: gainFocus on <NVDAObjects.IAccessible.sysListView32.ListItem object at 0x0555E6D0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 214, in executeEvent
  File "eventHandler.pyc", line 94, in __init__
  File "eventHandler.pyc", line 102, in next
  File "\\install01\install$\000007 - sevenP\Leonard\nvda_portable\userConfig\addons\unicornNVDA\globalPlugins\unicorn\__init__.py", line 340, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 102, in next
  File "NVDAObjects\__init__.pyc", line 1105, in event_gainFocus
  File "NVDAObjects\behaviors.pyc", line 606, in reportFocus
  File "NVDAObjects\__init__.pyc", line 991, in reportFocus
  File "speech\__init__.pyc", line 478, in speakObject
  File "speech\__init__.pyc", line 517, in getObjectSpeech
  File "speech\__init__.pyc", line 381, in getObjectPropertiesSpeech
  File "baseObject.pyc", line 41, in __get__
  File "baseObject.pyc", line 144, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\sysListView32.pyc", line 436, in _get_name
AttributeError: 'NoneType' object has no attribute 'width'
```

### Expected behavior:
NO error

### System configuration
#### NVDA installed/portable/running from source:
Portable

#### NVDA version:
2020.2

#### Windows version:
Windows Server 2012 R2

#### Name and version of other software in use when reproducing the issue:
Internet Information Services (IIS) Manager on said version of Windows server. However, it also applies to current versions of IIS manager.

### Other questions
#### Does the issue still occur after restarting your computer?
Yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
NO

#### If addons are disabled, is your problem still occuring?
Yes

#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
Yes


Discussion:
I'm pretty sure this is related to the fix in #2673, as LVM_GETVIEW returns 0 for this list. It is also a list with groupings in it.

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/sysListView32.py b/source/NVDAObjects/IAccessible/sysListView32.py
--- a/source/NVDAObjects/IAccessible/sysListView32.py
+++ b/source/NVDAObjects/IAccessible/sysListView32.py
@@ -433,7 +433,7 @@ def _get_name(self):
 		textList = []
 		for col in range(1, self.childCount + 1):
 			location = self._getColumnLocation(col)
-			if location.width == 0:
+			if location and location.width == 0:
 				continue
 			content = self._getColumnContent(col)
 			if not content:


Test patch:
Repository: nvaccess/nvda

Issue:
Windows 10 Mail: NVDA does not switch to browse mode when opening emails in version 16005.13110 and later
Hi,

A companion request to remove app modules for really old universal apps will follow.

### Background:
Microsoft has been testing various new features in Mail and Calendar for several months. As part of a new Calendar preview, Mail and Calendar has been combined into a single executable with a different name. This means NVDA's support for Mail is broken once users update to a version of Mail and Calendar with the combined executable (16005.13110), one of these being NvDA not switching to browse mode when a message opens in Mail.

### Steps to reproduce:
1. Add an account in Mail version 16005.13110 or later.
2. When a message arrives, open it.

### Actual behavior:
NVDA does not switch to browse mode.

### Expected behavior:
NVDA switches to browse mode.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
alpha-20643,f308a0d6

#### Windows version:
Windows 10 Version 20H2 beta (19042.421)

#### Name and version of other software in use when reproducing the issue:
Mail and Calendar 16005.13110

#### Other information about your system:
Used as an Insider Preview machine

### Other questions
#### Does the issue still occur after restarting your computer?
Yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes - same result in 2020.2 and 2020.1

#### If addons are disabled, is your problem still occurring?
Yes

#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
Not applicable

### Additional context:
The renamed executable is called "commsapes.exe". This means we need to migrate contents of hxoutlook app module to the new module. The good news is that since Mail and Calendar are now part of the same executable, it becomes possible to address Calendar app issues under one roof.

Note that this problem was resolved in Windows 10 App Essentials add-on.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/appModules/commsapps.py b/source/appModules/commsapps.py
new file mode 100644
--- /dev/null
+++ b/source/appModules/commsapps.py
@@ -0,0 +1,7 @@
+# A part of NonVisual Desktop Access (NVDA)
+# Copyright (C) 2020 NV Access Limited, Joseph Lee
+# This file is covered by the GNU General Public License.
+# See the file COPYING for more details.
+
+# An alias for hxoutlook appModule
+from .hxoutlook import *  # NOQA: F401, F403


Test patch:
Repository: nvaccess/nvda

Issue:
Unable to copy text from MS Word virtual buffer
### Steps to reproduce:
* Open MS word
* write some text
* Press ctrl+space to review the text or to use quick nav keys
* select some text
* press ctrl+c to copy the selected text

### Actual behavior:

The selected text is not copied to clipboard and the following error is logged:
```
ERROR - scriptHandler.executeScript (12:13:52.772) - MainThread (308):
error executing script: <bound method CursorManager.script_copyToClipboard of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x06ABA230>> with gesture 'contrôle+c'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 208, in executeScript
  File "cursorManager.pyc", line 409, in script_copyToClipboard
  File "treeInterceptorHandler.pyc", line 193, in copyToClipboard
TypeError: copyToClipboard() takes 1 positional argument but 2 were given
```

### Expected behavior:

The text is copied without error.

### System configuration
#### NVDA installed/portable/running from source:
Temporary copy.
#### NVDA version:
Last alpha snapshot.
#### Windows version:
10
#### Name and version of other software in use when reproducing the issue:
N/A
#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
Not tested.
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes. 2020.3 is OK.
#### If addons are disabled, is your problem still occuring?
Not tested
#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
No

### Note

Issue very propably introduced by PR #9843.
cc @JulienCochuyt 


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/window/winword.py b/source/NVDAObjects/window/winword.py
--- a/source/NVDAObjects/window/winword.py
+++ b/source/NVDAObjects/window/winword.py
@@ -1,5 +1,3 @@
-# -*- coding: UTF-8 -*-
-# NVDAObjects/window/winword.py
 # A part of NonVisual Desktop Access (NVDA)
 # Copyright (C) 2006-2020 NV Access Limited, Manish Agrawal, Derek Riemer, Babbage B.V.
 # This file is covered by the GNU General Public License.
@@ -613,8 +611,10 @@ def _get_locationText(self):
 		textList.append(_("{distance} from top edge of page").format(distance=distance))
 		return ", ".join(textList)
 
-	def copyToClipboard(self):
+	def copyToClipboard(self, notify):
 		self._rangeObj.copy()
+		if notify:
+			ui.reportTextCopiedToClipboard(self.text)
 		return True
 
 	def find(self,text,caseSensitive=False,reverse=False):


Test patch:
Repository: nvaccess/nvda

Issue:
Windows 10 Calculator: results are not announced in compact overlay mode
Hi,

Follow-up to PR #9429 

### Steps to reproduce:
In Windows 10 Calculator:

1. Switch to standard calculator mode (Alt+number row 1).
2. Press Alt+Up arrow to switch to always on top (compact overlay) mode.
3. Perform some calculations.

### Actual behavior:
Results are not announced.

### Expected behavior:
Results are announced.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
alpha-21429,874230a7

#### Windows version:
Windows 10 Version 20H2 (build 19042.662 beta)

#### Name and version of other software in use when reproducing the issue:
Calculator 10.2010.0.0

#### Other information about your system:
N/A

### Other questions
#### Does the issue still occur after restarting your computer?
Yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
Same behavior in 2020.3.

#### If addons are disabled, is your problem still occuring?
Yes

#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
Not applicable

### Additional context and solution
Caused by a missing Automation Id that should be included in result announcement script (UIA Automation Id is different for always on top result element). The same PR for #11880 will be applicable to this issue as well.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/appModules/calculator.py b/source/appModules/calculator.py
--- a/source/appModules/calculator.py
+++ b/source/appModules/calculator.py
@@ -26,6 +26,10 @@
 	"ContentPresenter",
 	# Briefly shown when closing date calculation calendar.
 	"Light Dismiss",
+	# Unit conversion/convert from.
+	"Value1",
+	# Unit conversion/converts into.
+	"Value2",
 ]
 
 
@@ -49,9 +53,10 @@ def event_nameChange(self, obj, nextHandler):
 			obj.UIAAutomationId not in noCalculatorEntryAnnouncements
 			and obj.name != self._resultsCache
 		):
-			# For unit conversion, UIA notification event presents much better messages.
+			# For unit conversion, both name change and notification events are fired,
+			# although UIA notification event presents much better messages.
 			# For date calculation, live region change event is also fired for difference between dates.
-			if obj.UIAAutomationId not in ("Value1", "Value2", "DateDiffAllUnitsResultLabel"):
+			if obj.UIAAutomationId != "DateDiffAllUnitsResultLabel":
 				ui.message(obj.name)
 			self._resultsCache = obj.name
 		if not self._shouldAnnounceResult:
@@ -94,7 +99,7 @@ def script_calculatorResult(self, gesture):
 		# Hack: only announce display text when an actual calculator button (usually equals button) is pressed.
 		# In redstone, pressing enter does not move focus to equals button.
 		if isinstance(focus, UIA):
-			if focus.UIAAutomationId == "CalculatorResults":
+			if focus.UIAAutomationId in ("CalculatorResults", "CalculatorAlwaysOnTopResults"):
 				queueHandler.queueFunction(queueHandler.eventQueue, focus.reportFocus)
 			else:
 				resultsScreen = api.getForegroundObject().children[1].lastChild


Test patch:
Repository: nvaccess/nvda

Issue:
Warning when using OCR when screen curtain is enabled
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 
-->

### Is your feature request related to a problem? Please describe.
For a long time I thought that the OCR function (Windows 10 OCR) just didn't work properly, because I got no results every time. Today I found out that I had turned on the screen curtain feature of NVDA, so the OCR only saw a black screen. After I turned off the screen curtain, the OCR worked fine.
### Describe the solution you'd like
If that's technically possible, I'd like it when NVDA warns you when you try to use the OCR feature while Screen Curtain is on.
### Describe alternatives you've considered
I don't know any alternatives, this seems to me the easiest solution.
### Additional context
I am using Windows 10 1909 (64-bit) build 18363.1198 and NVDA 2020.3.


Discussion:

Resolving patch:
diff --git a/source/globalCommands.py b/source/globalCommands.py
--- a/source/globalCommands.py
+++ b/source/globalCommands.py
@@ -3109,6 +3109,14 @@ def script_recognizeWithUwpOcr(self, gesture):
 			# Translators: Reported when Windows 10 OCR is not available.
 			ui.message(_("Windows 10 OCR not available"))
 			return
+		from visionEnhancementProviders.screenCurtain import ScreenCurtainProvider
+		screenCurtainId = ScreenCurtainProvider.getSettings().getId()
+		screenCurtainProviderInfo = vision.handler.getProviderInfo(screenCurtainId)
+		isScreenCurtainRunning = bool(vision.handler.getProviderInstance(screenCurtainProviderInfo))
+		if isScreenCurtainRunning:
+			# Translators: Reported when screen curtain is enabled.
+			ui.message(_("Please disable screen curtain before using Windows 10 OCR."))
+			return
 		from contentRecog import uwpOcr, recogUi
 		recog = uwpOcr.UwpOcr()
 		recogUi.recognizeNavigatorObject(recog)


Test patch: