andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

Clicking at the end of this text or just inserting it into Enki shows error message. #419

Open vi opened 7 years ago

vi commented 7 years ago
U+2060  foo⁠bar   WORD JOINER
U+2061  foo⁡bar   FUNCTION APPLICATION
U+2062  foo⁢bar   INVISIBLE TIMES
U+2063  foo⁣bar   INVISIBLE SEPARATOR
U+180E  foo᠎bar   MONGOLIAN VOWEL SEPARATOR
U+200B  foo​bar   ZERO WIDTH SPACE
U+200C  foo‌bar   ZERO WIDTH NON-JOINER
U+200D  foo‍bar   ZERO WIDTH JOINER
U+FEFF  foobar   ZERO WIDTH NO-BREAK SPACE
U+E0020 foo󠀠bar  TAG SPACE

The same file: http://vi-server.org/pub/unicodeseparators.txt

Traceback (most recent call last):
  File "/home/vi/src/git/qutepart/qutepart/__init__.py", line 1266, in _updateExtraSelections
    cursorColumnIndex)
  File "/home/vi/src/git/qutepart/qutepart/brackethlighter.py", line 142, in extraSelections
    blockText[columnIndex - 1] in self._ALL_BRACKETS and \
IndexError: string index out of range
Version 16.04.1
 Qutepart 3.0.1 (with binary parser)
 Qt 5.3.2

qutepart hlamer/qutepart@453b15deaa574aaa45a1d5de4fa15d17fa60eb89 enki 5b3994b669dc3354815032192011fcf4d1419354


Actually I expect Enki to have special "no secrets" mode where all characters are visible, no matter how tricky Unicode is it. The same mode can also handle files with embedded binary snippets.