This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
yeah, i noticed that too (my original example used an emoji for the Apple search menu item, and i got an off by one error). I think this is also a problem with editor.get_selection? I remember some discussion in the forums a while back -- there may be a workaround using some nsstring or uitextview methods. |
This comment has been minimized.
This comment has been minimized.
I remember I met the same problem when I wrote a script for Japanese emoji in a TextField. Perhaps we could enter an issue for Pythonista editor module. |
This comment has been minimized.
This comment has been minimized.
str(tv.text().substringWithRange_(tv.selectedRange())) seems like it migt work |
This comment has been minimized.
This comment has been minimized.
str(tv.text().substringWithRange_(tv.selectedRange())) seems like it migt work |
This comment has been minimized.
This comment has been minimized.
Seems ok, I'll change my code |
This comment has been minimized.
This comment has been minimized.
Perhaps you should also change your code, and I'm sorry but I don't know (or I forgot) how to send you a request to modify
|
This comment has been minimized.
Found a bug/problem/issue.🕐 ',
If the edited file contains some Unicode characters longer than one, like '
selected_text (and also editor.get_selection) is incorrect. It does not take in account real length of such strings.