Black Mamba disabled (empty pythonista_startup.py)
Description
Try to run following script and check commented instructions:
#!python3
import editor
# PLACE CURSOR ON THIS LINE
# - run the script
# - hit the down arrow key (HW keyboard)
# - oops and you're on line 14
editor.set_selection(15)
Steps to reproduce:
Place cursor on line 14
Run script (Cmd R or button, same behavior)
Now you're on line 3
Hit down key (keyboard) and you're on line 15
It's like it moves the cursor, but some internal variable holding line number wasn't updated? Thread issue? Tried to wrap it with on_main_thread, didn't help.
What's funny is a fact that if I try to hit left / arrow key, it behaves correctly. Only up / down arrow keys are causing this.
This issue is reproducible in ~70% of cases.
The behavior can be observed in this video, where I'm hitting Cmd R and then just Down arrow key.
Found this when I was implementing page up / down in Black Mamba.
Environment
pythonista_startup.py
)Description
Try to run following script and check commented instructions:
Steps to reproduce:
Cmd R
or button, same behavior)It's like it moves the cursor, but some internal variable holding line number wasn't updated? Thread issue? Tried to wrap it with
on_main_thread
, didn't help.What's funny is a fact that if I try to hit left / arrow key, it behaves correctly. Only up / down arrow keys are causing this.
This issue is reproducible in ~70% of cases.
The behavior can be observed in this video, where I'm hitting
Cmd R
and then justDown
arrow key.Found this when I was implementing page up / down in Black Mamba.