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

Issue:
NVDA problem with Notepad++
**Reported by DataTriny on 2015-10-30 23:11**
Hi,
When hovering the mouse on Notepad++ text editor, NVDA reports the wrong line (precisely it reports the fifth line below).



Discussion:
Comment 1 by dkager on 2015-11-01 12:12
May this be related to the issue that pressing a braille routing button sometimes clicks the wrong line? I believe there is a ticket for this but couldn't find it right off. Something about not being able to map X/Y coordinates to a specific line, especially if line-wrapping is enabled. Notepad++ is among my most used programs so naturally this sparked my interest.

@dkager could you improve this with your commit referenced above?
I'd have to investigate this issue again, but it's not really much of a priority for me right now.

Resolving patch:
diff --git a/source/NVDAObjects/window/scintilla.py b/source/NVDAObjects/window/scintilla.py
--- a/source/NVDAObjects/window/scintilla.py
+++ b/source/NVDAObjects/window/scintilla.py
@@ -66,6 +66,7 @@ class TextRangeStruct(ctypes.Structure):
 class ScintillaTextInfo(textInfos.offsets.OffsetsTextInfo):
 
 	def _getOffsetFromPoint(self,x,y):
+		x, y = winUser.ScreenToClient(self.obj.windowHandle, x, y)
 		return watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POSITIONFROMPOINT,x,y)
 
 	def _getPointFromOffset(self,offset):
@@ -73,7 +74,7 @@ def _getPointFromOffset(self,offset):
 		watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POINTXFROMPOSITION,None,offset),
 		watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POINTYFROMPOSITION,None,offset)
 		)
-		if point.x and point.y:
+		if point.x is not None and point.y is not None:
 			return point
 		else:
 			raise NotImplementedError


Test patch:
Repository: nvaccess/nvda

Issue:
No restart confirmation prompt when installing add-on from shell
Regression from #9151 

### Steps to reproduce:
1. Open an add-on from Windows Explorer
2. Install it

### Actual behavior:
No restart confirmation prompt is shown

### Expected behavior:
A restart confirmation prompt is shown

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
alpha-16682

cc @feerrenrut 


Discussion:
Hi,

OT, but while we're at it, can we also fix a typo (apdated)? Thanks.

Resolving patch:
diff --git a/source/gui/addonGui.py b/source/gui/addonGui.py
--- a/source/gui/addonGui.py
+++ b/source/gui/addonGui.py
@@ -549,7 +549,8 @@ def handleRemoteAddonInstall(addonPath):
 			wx.OK | wx.ICON_ERROR)
 		return
 	gui.mainFrame.prePopup()
-	installAddon(gui.mainFrame, addonPath)
+	if installAddon(gui.mainFrame, addonPath):
+		promptUserForRestart()
 	gui.mainFrame.postPopup()
 
 
@@ -684,7 +685,7 @@ def __init__(
 		self.aboutButton.Disable()
 		self.aboutButton.Bind(wx.EVT_BUTTON, self.onAbout)
 		# Translators: The close button on an NVDA dialog. This button will dismiss the dialog.
-		button = buttonSizer.addButton(self, label=_("Close"), id=wx.ID_CLOSE)
+		button = buttonSizer.addButton(self, label=_("&Close"), id=wx.ID_CLOSE)
 		self.Bind(wx.EVT_CLOSE, self.onClose)
 		sHelper.addDialogDismissButtons(buttonSizer)
 		mainSizer.Add(settingsSizer, border=20, flag=wx.ALL)
@@ -706,7 +707,7 @@ def _getIncompatReason(self, addon):
 		):
 			# Translators: The reason an add-on is not compatible. A more recent version of NVDA is
 			# required for the add-on to work. The placeholder will be replaced with Year.Major.Minor (EG 2019.1).
-			return _("An apdated version of NVDA is required. NVDA version {} or later."
+			return _("An updated version of NVDA is required. NVDA version {} or later."
 			).format(addonAPIVersion.formatForGUI(addon.minimumNVDAVersion))
 		elif not addonVersionCheck.isAddonTested(
 			addon,


Test patch:
Repository: nvaccess/nvda

Issue:
When UIA is used for contecst menus in Word 2010 some items are reported twice.
### Steps to reproduce:
1. Open Word 2010 using latest NVDA Alpha.
2. Open context menu,, and start navigating with the arrow keys.
### Actual behavior:
Some items are reported properly but some in a wrong way for example:
- Copy, cut and some other items are announced twice that is 'cut unavailable cut ctrl+x'
- the synonyms and styles are announced as 'synonyms collapsed menu item synonyms'
### Expected behavior:
They should be announced only once.

### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
alpha-16709,e51645d0

#### Windows version:
Windows 7 x64
#### Name and version of other software in use when reproducing the issue:
Word 2010 32-bit
#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your PC?
Yes
#### Have you tried any other versions of NVDA?
Yes 2018.3 works ok.
i believe it is caused by the fact that NVDA now uses UIA for these menus cc @michaelDCurran 


Discussion:
Is uia not only for word 2016?
UIA is used only for Word 2016 when we are talking about accessing the documents content, but context menu can be accessed with UIA in older versions of MS Word also. I am not sure if this was intentional.
cc @michaelDCurran 
I've been able to reproduce this with Office 2016 when right clicking on misspelled words.

Resolving patch:
diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py
--- a/source/NVDAObjects/UIA/__init__.py
+++ b/source/NVDAObjects/UIA/__init__.py
@@ -2,7 +2,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2009-2018 NV Access Limited, Joseph Lee, Mohammad Suliman, Babbage B.V.
+#Copyright (C) 2009-2019 NV Access Limited, Joseph Lee, Mohammad Suliman, Babbage B.V., Leonard de Ruijter
 
 """Support for UI Automation (UIA) controls."""
 
@@ -817,6 +817,8 @@ def findOverlayClasses(self,clsList):
 			clsList.append(SensitiveSlider) 
 		if UIAControlType==UIAHandler.UIA_TreeItemControlTypeId:
 			clsList.append(TreeviewItem)
+		if UIAControlType==UIAHandler.UIA_MenuItemControlTypeId:
+			clsList.append(MenuItem)
 		# Some combo boxes and looping selectors do not expose value pattern.
 		elif (UIAControlType==UIAHandler.UIA_ComboBoxControlTypeId
 		# #5231: Announce values in time pickers by "transforming" them into combo box without value pattern objects.
@@ -1490,6 +1492,16 @@ def _get_positionInfo(self):
 		info['level']=self._level
 		return info
 
+class MenuItem(UIA):
+
+	def _get_description(self):
+		name=self.name
+		description=super(MenuItem,self)._get_description()
+		if description!=name:
+			return description
+		else:
+			return None
+
 class UIColumnHeader(UIA):
 
 	def _get_description(self):


Test patch:
Repository: nvaccess/nvda

Issue:
Developer scratchpad setting is saved in current configuration profile instead of globally
### Steps to reproduce:
1. Enable the developer scratchpad setting in NVDA's advanced settings
2. Load a configuration profile
3. Disable the setting from the advanced category while the profile is active.

### Actual behavior:
The scratchpad setting is saved in the configuration profile.

### Expected behavior:
The developer scratchpad should be treated as a global setting.

### Additional thoughts
1. The development section can be added to the ConfigManager.BASE_ONLY_SECTIONS set, which is simple enough.
2. However, in this case, the advanced category will contain both global and profile specific settings, which is not very ideal.

cc @michaeldcurran 


Discussion:
Hmm, what's about the following options in the General NVDA Settings?
+ Language
+ Automatically start NVDA after I log on to Windows
+ Use NVDA on the Windows Logon screen (requires administrator privileges)
+ Automatically check for updates to NVDA
+ Allow the NVDA project to gather NVDA usage statistics
+ Notify for pending updates on startup

How many of them should be excluded from configurations profiles too? Maybe some of them are already excluded. I haven't tested this.

Resolving patch:
diff --git a/source/config/__init__.py b/source/config/__init__.py
--- a/source/config/__init__.py
+++ b/source/config/__init__.py
@@ -351,7 +351,12 @@ class ConfigManager(object):
 
 	#: Sections that only apply to the base configuration;
 	#: i.e. they cannot be overridden in profiles.
-	BASE_ONLY_SECTIONS = {"general", "update", "upgrade"}
+	BASE_ONLY_SECTIONS = {
+	"general", 
+	"update", 
+	"upgrade",
+	"development",
+}
 
 	def __init__(self):
 		self.spec = confspec


Test patch:
Repository: nvaccess/nvda

Issue:
Browse mode doesn't work in MS Word
### Steps to reproduce:
Open any MS Word document
switch to browse mode with NVDA+space
### Actual behavior:
Focus mode remains active with no error
### Expected behavior:
Browse mode should turn on
### System configuration
#### NVDA installed/portable/running from source:
installed
#### NVDA version:
alpha-16976,7fc6c71f
#### Windows version:
Windows 10 1803
#### Name and version of other software in use when reproducing the issue:
Microsoft Word 2016 16.0.11328.20220)
#### Other information about your system:

### Other questions
 @#### Does the issue still occur after restarting your PC?
Yes
#### Have you tried any other versions of NVDA?
No
@leonardder 


Discussion:
Hi, confirmed. Note that this does not happen with 2019.1, so looks like a recent commit to master might be to blame. Thanks.

 

From: jakubl7545 <notifications@github.com> 
Sent: Friday, March 29, 2019 12:18 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [nvaccess/nvda] Browse mode doesn't work in MS Word (#9422)

 


Steps to reproduce:


Open any MS Word document
switch to browse mode with NVDA+space


Actual behavior:


Focus mode remains active with no error


Expected behavior:


Browse mode should turn on


System configuration


NVDA installed/portable/running from source:


installed


NVDA version:


alpha-16976,7fc6c71f


Windows version:


Windows 10 1803


Name and version of other software in use when reproducing the issue:


Microsoft Word 2016 16.0.11328.20220)


Other information about your system:


Other questions


@#### Does the issue still occur after restarting your PC?
Yes


Have you tried any other versions of NVDA?


No
@leonardder <https://github.com/leonardder> 

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/9422> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkOkTWFJnmwbNJrhS55ndn4Wv_QGpks5vbmbkgaJpZM4cTFNU> .


Looks like the ability to disable browse mode by default is the cause here. I might be able to provide a fix next week. Was pretty sure I tested this properly before, but oh well.

Hi,

Regression caused by PR for #8716.

Thanks for confirming our thoughts.

Resolving patch:
diff --git a/source/treeInterceptorHandler.py b/source/treeInterceptorHandler.py
--- a/source/treeInterceptorHandler.py
+++ b/source/treeInterceptorHandler.py
@@ -27,7 +27,7 @@ def update(obj, force=False):
 	#If this object already has a treeInterceptor, just return that and don't bother trying to create one
 	ti=obj.treeInterceptor
 	if not ti:
-		if not obj.shouldCreateTreeInterceptor:
+		if not obj.shouldCreateTreeInterceptor and not force:
 			return None
 		try:
 			newClass=obj.treeInterceptorClass


Test patch:
Repository: nvaccess/nvda

Issue:
AppX: developer scratchpad setting is visible when it should not
Hi,

This issue requires testers to download a side loadable version of NVDA (Windows 10):

### Steps to reproduce:
1. Install Windows Store edition of NVDA.
2. With Windows Store version of NVDA running, open NVDA menu/Preferences/Settings/Advanced.
3. After accepting the disclaimer, tab through this panel.

### Actual behavior:
Developer scratchpad option is visible.

### Expected behavior:
Because Windows Store (AppX) edition of NVDA does not support third-party modules yet, developer scratchpad option must be hidden.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
Alpha.16982.AppX

#### Windows version:
Windows 10 Version 1903 (build 18362)

#### Name and version of other software in use when reproducing the issue:
None

#### Other information about your system:
None

### Other questions
#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Yes - this issue does not apply for regular distribution.



Discussion:

Resolving patch:
diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py
--- a/source/gui/settingsDialogs.py
+++ b/source/gui/settingsDialogs.py
@@ -1,7 +1,7 @@
 # -*- coding: UTF-8 -*-
 #settingsDialogs.py
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger
+#Copyright (C) 2006-2019 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
@@ -2002,12 +2002,16 @@ def __init__(self, parent):
 			wx.EVT_CHECKBOX,
 			lambda evt: self.openScratchpadButton.Enable(evt.IsChecked())
 		)
+		if config.isAppX:
+			self.scratchpadCheckBox.Disable()
 
 		# Translators: the label for a button in the Advanced settings category
 		label=_("Open developer scratchpad directory")
 		self.openScratchpadButton=devGroup.addItem(wx.Button(self, label=label))
 		self.openScratchpadButton.Enable(config.conf["development"]["enableScratchpadDir"])
 		self.openScratchpadButton.Bind(wx.EVT_BUTTON,self.onOpenScratchpadDir)
+		if config.isAppX:
+			self.openScratchpadButton.Disable()
 
 		# Translators: This is the label for a group of advanced options in the
 		#  Advanced settings panel


Test patch:
Repository: nvaccess/nvda

Issue:
Reduce Volume Synth Settings Ring increment/decrement to 5
Currently, upon navigating to Volume in the Synth Settings Ring and increasing/decreasing the volume, the change value is 10. However, while using headphones and often even on speakers, amounts of 10 bring about significant differences. Particularly when using NVDA at low volumes, one may wish to change volume by an amount of much lesser than 10, which cannot be achieved seamlessly using the Synth Settings Ring and necessitates usage of the Voice Settings dialog.
As a solution to the above problem I periodically encounter, I propose changing the increment/decrement amount of the Volume option in the Synth Settings Ring to 5 instead of 10, alike the Rate option. This will enable greater flexibility on the fly.


Discussion:
This is a valid suggestion. If nothing else, it should be set to an increment of 5 to bring it to parity with rate, pitch, etc.

Hi,

Are there synthesizers that cannot set volume to increments of five percent? If so, we cannot proceed, otherwise a developer working on this should change volume setting in synth driver handler to not use normal step of 10.

CC @TSpivey, @RAGB

Thanks.
@tspivey @ragb Could you please respond to @josephsl's https://github.com/nvaccess/nvda/issues/6754#issuecomment-273527095?
This should be fine to perform 
Hi,

Because this change may break some synthesizers that cannot handle this change, we should publish a note about this once a PR for this one is merged.

Thanks.

Resolving patch:
diff --git a/source/synthDriverHandler.py b/source/synthDriverHandler.py
--- a/source/synthDriverHandler.py
+++ b/source/synthDriverHandler.py
@@ -3,7 +3,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Joseph Lee
+#Copyright (C) 2006-2019 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Joseph Lee, Arnold Loubriat
 
 from copy import deepcopy
 import os
@@ -266,7 +266,7 @@ def RateSetting(cls,minStep=1):
 	def VolumeSetting(cls,minStep=1):
 		"""Factory function for creating volume setting."""
 		# Translators: Label for a setting in voice settings dialog.
-		return NumericSynthSetting("volume",_("V&olume"),minStep=minStep,normalStep=10,
+		return NumericSynthSetting("volume",_("V&olume"),minStep=minStep,normalStep=5,
 		# Translators: Label for a setting in synth settings ring.
 		displayName=pgettext('synth setting','Volume'))
 	@classmethod


Test patch:
Repository: nvaccess/nvda

Issue:
Announce the reverse located cell after moving to it when pressing shift + enter
### Steps to reproduce:

1. Open Excel;
2. In a sheet, move to cell A2 for example, with downArrow;
3. Realize the gesture Shift+Enter or Shift+numpadEnter, the focus is then moved to the reverse located cell (left, up, right or down, according to user's configuration in Excel).

### Actual behavior:

NVDA is silent, it doesn't announce the cell to which we have just moved.

### Expected behavior:

The current cell should be announced by NVDA.

#### NVDA version:

2019.1.1 portable and installable.

#### Windows version:

Windows 7, 8.1 and 10.

#### Does the issue still occur after restarting your PC?

Yes.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.

I have the same behavior as described above with NVDA version 2018.4 (portable and installable).



Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/window/excel.py b/source/NVDAObjects/window/excel.py
--- a/source/NVDAObjects/window/excel.py
+++ b/source/NVDAObjects/window/excel.py
@@ -877,6 +877,8 @@ def _get_states(self):
 		"kb:shift+tab",
 		"kb:enter",
 		"kb:numpadEnter",
+		"kb:shift+enter",
+		"kb:shift+numpadEnter",
 		"kb:upArrow",
 		"kb:downArrow",
 		"kb:leftArrow",


Test patch:
Repository: nvaccess/nvda

Issue:
Say all is broken inside Scintilla controls when word wrapping is on
<!--
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
-->

Reported by @lpintes in #9424.

### Steps to reproduce:

1. Open NVDA,
2. Open Notepad++,
3. Make sure word wrapping is enabled,
4. Write several lines,
5. Go back to the top of the document,
6. Perform Say all gesture.

### Actual behavior:

Only the first line is spoken.

### Expected behavior:

NVDA should read all the lines up to the end of the document.

### System configuration
#### NVDA installed/portable/running from source:

NVDA running from source.

#### NVDA version:

NVDA 2019.1.1.

#### Windows version:

Windows 10 Education, version 1809.

#### Name and version of other software in use when reproducing the issue:

Notepad++ v7.6.6.

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your PC?

Yes.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.

NVDA 2019.1.1 works correctly because this bug have been introduced by me in #9427.


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/window/scintilla.py b/source/NVDAObjects/window/scintilla.py
--- a/source/NVDAObjects/window/scintilla.py
+++ b/source/NVDAObjects/window/scintilla.py
@@ -199,7 +199,7 @@ def _getLineOffsets(self,offset):
 			end=self._getOffsetFromPoint(location.right, y)
 			# If this line wraps to the next line,
 			# end is the first offset of the next line.
-			if watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POINTYFROMPOSITION,None,end)==y:
+			if self._getPointFromOffset(end).y==y:
 				# This is the end of the document line.
 				# Include the EOL characters in the returned offsets.
 				end=watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POSITIONAFTER,end,None)


Test patch:
Repository: nvaccess/nvda

Issue:
Python 3: use next(iter) instead of iter.next()
Hi,

Yet another syntax issue to resolve:

### Is your feature request related to a problem? Please describe.
In Python 2.x, it was possible to go through iterators via iter.next() method. This was made simple in Python 2.6 with the built-in next() function, and this is the only method for built-in iteration control in python 3.

### Describe the solution you'd like
As NVDA uses Python 2.7, it will be able to work with next(iter), making it compatible with Python 3. This will affect the following modules:

* GUI/settings dialogs: retrieving options for one or two settings.
* Event handler: handling next chain of events.
* Say all handler: say all generator.

### Describe alternatives you've considered
None

### Additional context
None



Discussion:
Hi,

In case of eventHandler.EventExecutor object, I think it can be ignored, as it defines its own next() method that already uses Python 3 next(iter) idiom.

Thanks.
> In case of eventHandler.EventExecutor object, I think it can be ignored, as it defines its own next() method that already uses Python 3 next(iter) idiom.

Note that python 3 uses __next__ instead of next. Also, looking at the _EventExecuter init function, it executes self.next() instead of next(self). These are pretty trivial though.

Resolving patch:
diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py
--- a/source/gui/settingsDialogs.py
+++ b/source/gui/settingsDialogs.py
@@ -2706,7 +2706,7 @@ def makeSettings(self, settingsSizer):
 		tetherChoices = [x[1] for x in braille.handler.tetherValues]
 		self.tetherList = sHelper.addLabeledControl(tetherListText, wx.Choice, choices=tetherChoices)
 		tetherChoice=braille.handler.TETHER_AUTO if config.conf["braille"]["autoTether"] else config.conf["braille"]["tetherTo"]
-		selection = (x for x,y in enumerate(braille.handler.tetherValues) if y[0]==tetherChoice).next()
+		selection = next((x for x,y in enumerate(braille.handler.tetherValues) if y[0]==tetherChoice))
 		try:
 			self.tetherList.SetSelection(selection)
 		except:


Test patch: