k.insert_mode_bg_color = white and settings are ignored

12 views
Skip to first unread message

vitalije

unread,
Feb 27, 2012, 12:45:35 PM2/27/12
to leo-editor
Today I have updated my Leo version and found that it is almost
impossible to use it because I used to have syntax colors for text
rather light and background used to be dark. Now whenever I try to
type text in Leo body it become white. I have searched through Leo
sources and found that in keyHadlerClass.__init__ those colors are
hard-coded with note that real values should be replaced in
k.finishCreate method. However, those hard-coded values for colors are
not changed in finishCreate.

Vitalije

vitalije

unread,
Feb 27, 2012, 12:52:35 PM2/27/12
to leo-e...@googlegroups.com
I have noticed this bug in revision 5030.

Vitalije

redla

unread,
Feb 27, 2012, 3:05:12 PM2/27/12
to leo-editor
I've observed something which is IMHO caused by the same issue:

For a long time I have
@string target_language = plain
in my ~/.leo/myLeoSettings.leo
(because I am using leo just for handling hierarchical notes and so I
don't want any special handing of any parts of the text). That worked
till today update (i.e. Fri version was still OK). Now if I for ex.
have
---
Minor clean-up

geometry/object.h
geometry/templatelibrary.h
---
in the body of a node, that "object" word is colored blue(!) (the rest
is black as expected).
Definitively something related to latest EKR(?) changes...
KR,
Radim

Edward K. Ream

unread,
Feb 27, 2012, 3:12:20 PM2/27/12
to leo-e...@googlegroups.com
On Mon, Feb 27, 2012 at 11:45 AM, vitalije <vita...@gmail.com> wrote:
> Today I have updated my Leo version and found that it is almost
> impossible to use it because I used to have syntax colors for text
> rather light and background used to be dark. Now whenever I try to
> type text in Leo body it become white. I have searched through Leo
> sources and found that in keyHandlerClass.__init__ those colors are

> hard-coded with note that real values should be replaced in
> k.finishCreate method. However, those hard-coded values for colors are
> not changed in finishCreate.

Thanks for this report, and for your testing.

I'll fix this immediately.

Edward

redla

unread,
Feb 27, 2012, 3:17:43 PM2/27/12
to leo-editor
My problem starts appearing (as expected) in bzr:5004, so in fact it's
a bit different from the previous case.
Still it's something broken recently, so it should(?) be easy to fix
it soon...

BTW: Also words like class, and, is, from are colored blue and all
strings are colored green. So any plain text is a bit colorfull now...

From the Log window:
Leo 4.9.1 devel, build 5030, 2012-02-27 21:15:38
Python 3.2.2, qt version 4.8.0
linux2
setting leoID from os.getenv('USER'): 'halir'
load dir: /usr/local/Sources/leo/leo/core
global config dir: /usr/local/Sources/leo/leo/config
home dir: /home/halir
reading settings in /usr/local/Sources/leo/leo/config/leoSettings.leo
reading settings in /home/halir/.leo/myLeoSettings.leo
reading settings in /home/halir/Develop/BISim/BISim.leo
reading: /home/halir/Develop/BISim/BISim.leo

Edward K. Ream

unread,
Feb 27, 2012, 3:56:58 PM2/27/12
to leo-e...@googlegroups.com
On Mon, Feb 27, 2012 at 11:45 AM, vitalije <vita...@gmail.com> wrote:

This was a simple oversight. The settings were being cleared after
being computed.

The fix is on the trunk at rev 5032. All unit tests pass, including a
new test for this kind of problem.

Edward

Edward K. Ream

unread,
Feb 27, 2012, 3:57:32 PM2/27/12
to leo-e...@googlegroups.com
On Mon, Feb 27, 2012 at 2:17 PM, redla <radim...@gmail.com> wrote:
> My problem starts appearing (as expected) in bzr:5004, so in fact it's
> a bit different from the previous case.

It's next on the list.

Edward

Edward K. Ream

unread,
Feb 27, 2012, 5:03:52 PM2/27/12
to leo-e...@googlegroups.com

Fixed on the trunk at rev 5033. All usual tests pass, including a new
unit test.

Pylint is also happy after removing some kludges foolishly inserted to
keep pylint quiet during the reorg.

Edward

redla

unread,
Feb 28, 2012, 2:22:14 AM2/28/12
to leo-editor
> > On Mon, Feb 27, 2012 at 2:17 PM, redla <radim.ha...@gmail.com> wrote:
> >> My problem starts appearing (as expected) in bzr:5004, so in fact it's
> >> a bit different from the previous case.
>
> Fixed on the trunk at rev 5033

Yeah, these unwanted colors disappear again ;-) TX for the fix!
Radim

Edward K. Ream

unread,
Feb 28, 2012, 5:55:13 AM2/28/12
to leo-e...@googlegroups.com

You're welcome. Thanks for confirming that the fix works.

I did add a unit test that supposedly tests that all the config
settings are set properly, but really, this test would only work
completely when run on *your* machine. I suppose I could set the
settings in unitTest.leo and test that they "took", but I don't want
to do that...

Edward

Reply all
Reply to author
Forward
0 new messages