News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Changes in code

Started by blamek, March 31, 2008, 02:02:43 PM

Previous topic - Next topic

blamek

Hi,
Is there a an option to enable color marks on the margin to indicate that some changes were made to code (yellow/green -> unsaved/saved)

regards,

Blamek

JGM

I don't think that scintilla (the component used for editing on codeblocks) supports that, but you could check on http://scintilla.sourceforge.net/

blamek

I didn't find it :( I'm a little bit disappointed because it's really useful feature.

eranif

Quote from: JGM on March 31, 2008, 03:14:01 PM
I don't think that scintilla (the component used for editing on codeblocks) supports that, but you could check on http://scintilla.sourceforge.net/

It actually does, but you need to implement it.

You can use one of Scintilla's 5 margins and:

- add new margin to the left -> define it as symbol margin
- register two images -> red marker and green marker
- in the EVT_SCI_UPDATEUI handler (i think maybe EVT_SCI_MODIFIED is enough but need to check it) -> if the line was modified, add red marker to that line
- when saving the file, you can simply replace all markers on that margin to green or remove them

Not too complex,
Eran

JGM