Hi all,
I noticed that column editing in C::B 12.11 is totally broken, am I right?
Thanks.
Explanation? Example?
Example1: pressing ALT and drawing a vertical line, I want to write an all lines. It writes only on latest.
Example2: pressing ALT and drawing a vertical line, pressing TAB should indent the text to the right. Now it makes a lot of mess deleting pieces of text.
The first works if you set the options in "Settings -> Editor -> Margins and caret -> Selections" correctly.
The second does not work and might be a bug or a scintilla limitation ( I will see if I find the time to look into it deeper).
Thanks, example 1 is now working.
Quote from: jens on February 13, 2013, 06:59:31 PM
The second does not work and might be a bug or a scintilla limitation ( I will see if I find the time to look into it deeper).
It works in scite and I think our smart indenter messes things.
Quote from: oBFusCATed on February 13, 2013, 08:43:32 PM
Quote from: jens on February 13, 2013, 06:59:31 PM
The second does not work and might be a bug or a scintilla limitation ( I will see if I find the time to look into it deeper).
It works in scite and I think our smart indenter messes things.
If all smartindent-plugins are switched off it still does not work.
But it works as expected, if I select several lines with Ctrl-key pressed.
So it might be an issue with rectangle-selection (with width 0 in this special case).
Quote from: jens on February 13, 2013, 09:23:08 PM
If all smartindent-plugins are switched off it still does not work.
For me it works if I compile cb with cb, no contrib plugins. Gentoo linux, latest head.
Quote from: oBFusCATed on February 13, 2013, 09:54:30 PM
Quote from: jens on February 13, 2013, 09:23:08 PM
If all smartindent-plugins are switched off it still does not work.
For me it works if I compile cb with cb, no contrib plugins. Gentoo linux, latest head.
Good catch, I found the "evil" plugin, it's the spellchecker.
Quote from: fubo on February 13, 2013, 07:03:42 PM
Thanks, example 1 is now working.
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.
Quote from: jens on February 14, 2013, 06:14:05 AM
Good catch, I found the "evil" plugin, it's the spellchecker.
Strange...
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.
Thanks! I confirm it on Win7 x64. Now it works!
Quote from: jens on February 14, 2013, 06:14:05 AM
Good catch, I found the "evil" plugin, it's the spellchecker.
I will look into it
I still don't know what the problem is:
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
...
Any ideas?
Quote from: danselmi on February 15, 2013, 11:34:27 AM
I still don't know what the problem is:
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
...
Any ideas?
I see if I find the time to look into it this weekend.
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.
I have tested your patch. It is working.
For me, it looks like another workaround not a solution?
Yes and no.
It works around the issue, but it still does the styling for the file (not just a return) so it's also a (hopefully) correct solution.
So please commit it. (Or I will do it.)
And thank a lot Jens!
Quote from: danselmi on February 25, 2013, 02:29:52 PM
So please commit it. (Or I will do it.)
And thank s lot Jens!
Committed in svn r8857 .