User forums > Using Code::Blocks

Column editing in C::B 12.11

<< < (3/4) > >>

fubo:

--- Quote from: jens on February 14, 2013, 06:14:05 am ---If you either disable the spellchecker-plugin completetely via "Plugins -> Manage plugins" or at least disable online spellchecking from "Settings -> Editor -> SpellChecker" the second example should work also.

--- End quote ---
Thanks! I confirm it on Win7 x64. Now it works!

danselmi:

--- Quote from: jens on February 14, 2013, 06:14:05 am ---Good catch, I found the "evil" plugin, it's the spellchecker.

--- End quote ---
I will look into it

danselmi:
I still don't know what the problem is:


--- Code: ---void OnlineSpellChecker::DoSetIndications(cbEditor* ctrl)const // called OnUpdate
...
    if(stc->SelectionIsRectangle() || (stcr && stcr->SelectionIsRectangle())) return; // workaround so Example2 is working
    stc->IndicatorSetStyle(GetIndicator(), wxSCI_INDIC_SQUIGGLE);
    // when we return here, after IndicatorSetStyle() the Example 2 is not working
...

--- End code ---

Any ideas?

Jenna:

--- Quote from: danselmi on February 15, 2013, 11:34:27 am ---I still don't know what the problem is:


--- Code: ---void OnlineSpellChecker::DoSetIndications(cbEditor* ctrl)const // called OnUpdate
...
    if(stc->SelectionIsRectangle() || (stcr && stcr->SelectionIsRectangle())) return; // workaround so Example2 is working
    stc->IndicatorSetStyle(GetIndicator(), wxSCI_INDIC_SQUIGGLE);
    // when we return here, after IndicatorSetStyle() the Example 2 is not working
...

--- End code ---

Any ideas?



--- End quote ---
I see if I find the time to look into it this weekend.

Jenna:
Please test the attached patch and give feedback.

It uses the already existing oldCtrl to ensure the calls to IndicatorSetStyle(), IndicatorSetForeground() and IndicatorSetUnder() are done only once for each control and not every time DoSetIndications() is called.

Ths will work unless another part of C::B will use (amd modify) the same indicator, what (most likely) works with the existing code, but would probably lead to other issues.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version