✨ macOS Accessibility `kAXLineForIndexParameterizedAttribute` not obtainable through the AX APIs
enhancement
### Description
it should be possible to get the current line number through the AX APIs by giving a location in the TextArea. currently it doesn't work and the API returns `parameterizedAttributeUnsupported`. might be linked to macOS Accessibility data missing in CodeEdit. (see https://github.com/CodeEditApp/CodeEditTextView/issues/114)
this makes it impossible to apply Vim motions in CodeEdit through the AX APIs. a real pity!
### Alternatives Considered
at that point i can't find any alternatives, because getting the right line number is a crucial part for navigating through the TextArea with the AX APIs.
### Additional Context
calling `AXUIElementCopyParameterizedAttributeValue(axFocusedElement, kAXLineForIndexParameterizedAttribute as CFString, location as CFTypeRef, ¤tLine)` returns `parameterizedAttributeUnsupported` rather than filling the `currentLine` with... the current line number. `location` is a character location in the TextArea (0 for beginning of document).
### Screenshots
_No response_
关闭于 2025-07-17 0 条评论