Repository: nvaccess/nvda

Issue:
nvda is skipping empty columns when navigating with ctrl+alt+left/right arrows
hello all.

in recent snapshots of nvda, i discovered some strange issue.

in multy column listviews, nvda is skipping empty cells when navigating with ctrl+alt+left/right arrows.

to better observe a situation, try to run code below and try to navigate with in first item.

```
import wx

class myForm(wx.Frame):
	def __init__(self):
		wx.Frame.__init__(self, None, wx.ID_ANY, "List Control Tutorial")
		panel = wx.Panel(self, wx.ID_ANY)
		self.list_ctrl = wx.ListCtrl(panel, size=(-1,100), style=wx.LC_REPORT                         |wx.BORDER_SUNKEN)
		self.list_ctrl.InsertColumn(0, 'First name')
		self.list_ctrl.InsertColumn(1, 'Last name')
		self.list_ctrl.InsertColumn(2, 'Age')
		self.list_ctrl.Append(("john", "", 25))
		self.list_ctrl.Append(("steve", "jobs", 30))
if __name__ == "__main__":
	app = wx.App(False)
	frame = myForm()
	frame.Show()
	app.MainLoop()
```


Discussion:
cc: @leonardder is this maybe because empty columns are invisible? Could be affected by #9873. However, I do not see why someone needs to have empty columns in lists reported by NVDA.
yes, for some people including me it is important.

because i can jump for example to last name which for example on this
specific item in null but on another items it can be filled.

and also, i don't think they are invisible, they are just empty for
one specific item, but not for other.

On 12/13/19, Adriani90 <notifications@github.com> wrote:
> cc: @leonardder is this maybe because empty columns are invisible? Could be
> affected by #9873. However, I do not see why someone needs to have empty
> columns in lists reported by NVDA.
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly or view it on GitHub:
> https://github.com/nvaccess/nvda/issues/10615#issuecomment-565190524


-- 
with best regards beqa

This indeed looks like a regression. It makes sense to skip the columns when they are of width 0, but in this case, that shouldn't be the case.

Resolving patch:
diff --git a/source/NVDAObjects/behaviors.py b/source/NVDAObjects/behaviors.py
--- a/source/NVDAObjects/behaviors.py
+++ b/source/NVDAObjects/behaviors.py
@@ -577,11 +577,14 @@ def _moveToColumnNumber(self, column):
 	def script_moveToNextColumn(self, gesture):
 		cur = api.getNavigatorObject()
 		if cur == self:
-			new = self.simpleFirstChild
+			new = self.firstChild
 		elif cur.parent != self:
-			new = self
+			self._moveToColumn(self)
+			return
 		else:
-			new = cur.simpleNext
+			new = cur.next
+		while new and new.hasIrrelevantLocation:
+			new = new.next
 		self._moveToColumn(new)
 	script_moveToNextColumn.canPropagate = True
 	# Translators: The description of an NVDA command.
@@ -591,10 +594,12 @@ def script_moveToPreviousColumn(self, gesture):
 		cur = api.getNavigatorObject()
 		if cur == self:
 			new = None
-		elif cur.parent != self or not cur.simplePrevious:
+		elif cur.parent != self or not cur.previous:
 			new = self
 		else:
-			new = cur.simplePrevious
+			new = cur.previous
+			while new and new.hasIrrelevantLocation:
+				new = new.previous
 		self._moveToColumn(new)
 	script_moveToPreviousColumn.canPropagate = True
 	# Translators: The description of an NVDA command.


Test patch: