Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions source/NVDAObjects/window/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down