Skip to content

Code structure highlight stops prematurely in narrow window #995

@kmcnaught

Description

@kmcnaught

Bug Description

If the browser window width is small enough (or zoomed in) and code lines are long enough to require horizontal scrolling, then sometimes the code structure highlight stops before the end of the line.

image

video example showing highlight state:
https://www.loom.com/share/0227af771b3e446db85189a665068187

How To Reproduce

I can't repro this just by pasting in an example that previously caused the issue, it seems to depend on some previous state. This code has reproduced the bug for me if I type it out line by line (starting with the sample code and adding to the bottom of the editor) with browser zoom set at 175% in Chrome. I also tried it with a slightly different window size/zoom and it didn't repro that time - I have not been able to pin down the exact requirements.

# Imports go at the top
from microbit import *


# Code in a 'while True:' loop repeats forever
while True:
    display.show(Image.HEART)
    sleep(1000)
    display.scroll('Hello')
    if False:
        print("no")
    if True:
        if True:
            sleep(100)
            print("hello my name is blasduioajdioas djiosa djisoa dj ioasd jio asd")
        

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions