Repository: nvaccess/nvda

Issue:
When performing say all in the log viewer cared isn't following spoken text.
### Steps to reproduce:
1. open log viewer.
2. perform say all.
3. stop say all after some lines, and check caret location with NVDA+up arrow.
### Actual behavior:
Caret is in the place from which you've started reading.
### Expected behavior:
Caret should follow like in the notepad or MS Word.
### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
2018.4.1 tested also with recent Alpha.
#### Windows version:
Windows 7
#### Name and version of other software in use when reproducing the issue:
None
#### 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?
Back to 2017.1 the issue was present in every version


Discussion:
hello.
i tested with nvda 2017.3 on windows xp two times and i could not reproduce the issue.
Rather than fix this log viewer issue, my preference would be to replace the log viewer with the following:
- A read only text box for 'devInfo'
- A button to open the log file in a default text editor.
  - Text editors such as Notepad++ have auto/manual refresh functionality, and the ability to save a copy of the file.
- A command to open the log in default editor directly so users can override the `NVDA+F1` shortcut if they wish.

@michaelDCurran @jcsteh @leonardder any opinion on this?
@feerrenrut I've used log viewer just as a convenient example. This problem occurs with most wx.TextCtrl's which I've seen in the wild - it is particularly problematic in apps used for reading longer texts such as QRead.
Ah, thanks for pointing that out @lukaszgo1

Resolving patch:
diff --git a/source/NVDAObjects/window/edit.py b/source/NVDAObjects/window/edit.py
--- a/source/NVDAObjects/window/edit.py
+++ b/source/NVDAObjects/window/edit.py
@@ -3,38 +3,30 @@
 # This file is covered by the GNU General Public License.
 # See the file COPYING for more details.
 
-import locale
 from typing import (
 	Dict,
 	Optional,
 )
 
 import comtypes.client
-import struct
 import ctypes
 from comtypes import COMError
 import oleTypes
 import colors
-import globalVars
 import NVDAHelper
 import eventHandler
 import comInterfaces.tom
 from logHandler import log
 import languageHandler
 import config
-import speech
 import winKernel
 import api
 import winUser
 import textInfos.offsets
-from keyboardHandler import KeyboardInputGesture
-from scriptHandler import isScriptWaiting
 import controlTypes
 from controlTypes import TextPosition
 from . import Window
-from .. import NVDAObjectTextInfo
 from ..behaviors import EditableTextWithAutoSelectDetection
-import braille
 import watchdog
 import locationHelper
 import textUtils
@@ -465,16 +457,17 @@ def _getParagraphOffsets(self,offset):
 	comInterfaces.tom.tomStory:textInfos.UNIT_STORY,
 }
 
-NVDAUnitsToITextDocumentUnits={
-	textInfos.UNIT_CHARACTER:comInterfaces.tom.tomCharacter,
-	textInfos.UNIT_WORD:comInterfaces.tom.tomWord,
-	textInfos.UNIT_LINE:comInterfaces.tom.tomLine,
-	textInfos.UNIT_SENTENCE:comInterfaces.tom.tomSentence,
-	textInfos.UNIT_PARAGRAPH:comInterfaces.tom.tomParagraph,
-	textInfos.UNIT_STORY:comInterfaces.tom.tomStory,
-	textInfos.UNIT_READINGCHUNK:comInterfaces.tom.tomSentence,
+NVDAUnitsToITextDocumentUnits: Dict[str, int] = {
+	textInfos.UNIT_CHARACTER: comInterfaces.tom.tomCharacter,
+	textInfos.UNIT_WORD: comInterfaces.tom.tomWord,
+	textInfos.UNIT_LINE: comInterfaces.tom.tomLine,
+	textInfos.UNIT_SENTENCE: comInterfaces.tom.tomSentence,
+	textInfos.UNIT_PARAGRAPH: comInterfaces.tom.tomParagraph,
+	textInfos.UNIT_STORY: comInterfaces.tom.tomStory,
+	textInfos.UNIT_READINGCHUNK: comInterfaces.tom.tomLine,
 }
 
+
 class ITextDocumentTextInfo(textInfos.TextInfo):
 
 	def _get_pointAtStart(self):


Test patch: