Line Highlight Color Improvement

23 views
Skip to first unread message

tbp1...@gmail.com

unread,
Mar 4, 2022, 10:09:53 AM3/4/22
to leo-editor
Leo can highlight the current cursor line in the body.  If you haven't tried this out yet, there is an item in the Help/Open Help Topics menu that tells you what settings to use.

The code tries to compute a reasonable highlight color based on the theme in use.  You can override this color with your own choice using a setting.  But previously, if you opened a theme's outline, say if you wanted to edit it, that theme's color would become used by all open outlines but the highlight code would not change to match.  This could produce unreadable text if you were unlucky.

With today's devel branch, the highlighting code notices the change in colors and recomputes the highlight color.  The new highlight color will be applied the next time you move the cursor.

jkn

unread,
May 9, 2022, 3:09:41 PM5/9/22
to leo-editor
... and I have just come across this and will find it useful - thanks!

J^n

tbp1...@gmail.com

unread,
May 9, 2022, 3:12:07 PM5/9/22
to leo-editor
: )

jkn

unread,
May 14, 2022, 6:54:32 AM5/14/22
to leo-editor
Would it be a good idea to have the highlight colour as an (overridable) setting within themes?

tbp1...@gmail.com

unread,
May 14, 2022, 7:15:23 AM5/14/22
to leo-editor
I have thought about this.  It's certainly a possibility.  One reason I didn't put effort into it is that, if you open a theme outline while Leo is already open, its colors take over even for outlines that are already open.  But the name of the theme that Leo reports back to a program does not change to match.  So the only way to be sure of choosing a reasonable highlight color for the theme in effect is to take the actual colors from the body pane, and compute the color based on them.

I could look into it further, though.

Reply all
Reply to author
Forward
0 new messages