User forums > Help

Changes in code

(1/1)

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/

--- End quote ---

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:
Hey, thats nice!  :D

Navigation

[0] Message Index

Go to full version