zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.68k stars 1.16k forks source link

Bug: Inconsistent Python syntax highlighting #2690

Closed ThatMightyGuy closed 1 year ago

ThatMightyGuy commented 1 year ago

Description of the problem or steps to reproduce

Say, you have a statement that is a complex boolean expression: v1 != "Dolor" or v2 != "Ipsum" If the any part of the expression has a string ("Dolor", for example), then any comparision operators on that line coming after it will not have syntax highlighting: demo demo2

Specifications

Commit hash: 225927b9 OS: Arch Linux 6.0.2-arch1-1 Terminal: Windows Terminal SSH connection, host has zsh

sertonix commented 1 year ago

It sounds wierd but I think this is related to #2548. It is also an operator after a string in the line.

JoeKar commented 1 year ago

This seems to be related to #1457. At least the whole region stuff should be fixed first, otherwise the syntax highlighting is kind of broken.