fix(editor): Fix mapping with special characters (#5837)

* fix: Fix mapping with special characters

* refactor: rename var

* test: update more unit tests

* test: update mapping test

* test: update mapping test
This commit is contained in:
Mutasem Aldmour
2023-03-30 15:50:47 +02:00
committed by GitHub
parent ddc8f30e6d
commit f8f584c136
7 changed files with 53 additions and 23 deletions

View File

@@ -77,7 +77,9 @@ export default Vue.extend({
segment.kind === 'plaintext'
? segment.plaintext.length
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(segment.resolved as any).toString().length;
segment.resolved
? (segment.resolved as any).toString().length
: 0;
segment.to = cursor;