Patch #3280 2012-04-23 06:19

ziss_dm

Highlight debug line with colour (ala Borland IDE)
Download
3280-Highlight_debu.patch (1.7 KB)
Category
Application::Refinement
Status
Accepted
Close date
2013-03-31 20:07
Assigned to
tpetrov
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp    (revision 7936)
+++ src/sdk/cbeditor.cpp    (working copy)
@@ -54,6 +54,8 @@
 #define BOOKMARK_STYLE        wxSCI_MARK_ARROW
 #define BREAKPOINT_STYLE      wxSCI_MARK_CIRCLE
 #define DEBUG_STYLE           wxSCI_MARK_ARROW
+#define DEBUG_STYLE_HL        wxSCI_MARK_BACKGROUND
+//
 
 enum
 {
@@ -62,7 +64,8 @@
     BREAKPOINT_MARKER,
     BOOKMARK_MARKER,
     ERROR_MARKER,
-    DEBUG_MARKER
+    DEBUG_MARKER,
+    DEBUG_MARKER_HL,
 };
 
 
@@ -1407,7 +1410,8 @@
                                          (1 << BREAKPOINT_DISABLED_MARKER) |
                                          (1 << BREAKPOINT_OTHER_MARKER) |
                                          (1 << DEBUG_MARKER) |
-                                         (1 << ERROR_MARKER));
+                                         (1 << ERROR_MARKER) |
+                                         (1 << DEBUG_MARKER_HL));
     control->MarkerDefine(BOOKMARK_MARKER, BOOKMARK_STYLE);
     control->MarkerSetBackground(BOOKMARK_MARKER, wxColour(0xA0, 0xA0, 0xFF));
 
@@ -1438,6 +1442,8 @@
     }
     control->MarkerDefine(DEBUG_MARKER, DEBUG_STYLE);
     control->MarkerSetBackground(DEBUG_MARKER, wxColour(0xFF, 0xFF, 0x00));
+    control->MarkerDefine(DEBUG_MARKER_HL, DEBUG_STYLE_HL);
+    control->MarkerSetBackground(DEBUG_MARKER_HL, wxColour(0x00, 0xFF, 0x00));
     control->MarkerDefine(ERROR_MARKER, ERROR_STYLE);
     control->MarkerSetBackground(ERROR_MARKER, wxColour(0xFF, 0x00, 0x00));
 
@@ -2308,6 +2314,7 @@
 void cbEditor::SetDebugLine(int line)
 {
     MarkLine(DEBUG_MARKER, line);
+    MarkLine(DEBUG_MARKER_HL, line);
     m_pData->m_LastDebugLine = line;
 }
 
ollydbg 2012-04-26 00:30

Nice patch, I will test it in the near future.

ollydbg

ollydbg 2012-05-10 07:06
tpetrov 2012-05-12 15:38

Ollydbg, I'm taking this patch if you don't mind :)

ziss_dm: On thing to test is what happens if you use a dark theme for the editor or blue one...

ziss_dm 2012-05-14 06:31
Hi tpetrov,

I'm slightly lost... ;( Looks like style for "debugger active line" was specifically removed for some reason.

it is documented here:
http://wiki.codeblocks.org/index.php?title=Creating_a_custom_lexer_for_Code::Blocks_editor


But editorcolourset.cpp has this lines:
        // remove old settings, no longer used
        unsigned int i = 0;
        while (i < it->second.m_Colours.GetCount())
        {
            OptionColour* opt = it->second.m_Colours.Item(i);
            // valid values are:
            if (opt->value < 0 &&               // styles >= 0
                opt->value != cbSELECTION &&    // cbSELECTION
                opt->value != cbHIGHLIGHT_LINE) // cbHIGHLIGHT_LINE
            {
                it->second.m_Colours.Remove(opt);
                delete opt;
            }
            else
                ++i;
        }





tpetrov 2013-03-31 20:07

In svn rev 8930.

Thank you and sorry for the delay.