Author Topic: Changes in code  (Read 4706 times)

Offline blamek

  • Single posting newcomer
  • *
  • Posts: 4
Changes in code
« on: March 31, 2008, 02:02:43 pm »
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

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Changes in code
« Reply #1 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/

Offline blamek

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changes in code
« Reply #2 on: April 01, 2008, 10:02:25 am »
I didn't find it :( I'm a little bit disappointed because it's really useful feature.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: Changes in code
« Reply #3 on: April 01, 2008, 02:08:20 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

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Changes in code
« Reply #4 on: April 01, 2008, 03:24:08 pm »
Hey, thats nice!  :D