Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: stefanos_ on June 09, 2013, 04:25:50 pm

Title: Margins and Caret issue
Post by: stefanos_ on June 09, 2013, 04:25:50 pm
OS: Linux Debian testing (jessie)
GUI framework: wxGTK-2.8.12
C::B revision: 9128
GCC: 4.7.3 32-bit

I think I might have discover a bug with margins and caret settings in editor. I went to Settings > Editor > Margins and caret, and checked "Allow multiple selections..." and "Enable typing (and deleting)...".

I select the lines of my choice with Ctrl and mouse, I can see my cursor making a last cursor line along column. Then I press Ctrl-shift-arrows (left or right) to highlight the keyword I would like to replace and instead of highlight all keywords under cursor, it would select only the keyword from last cursor. If I press delete, it would delete selectively than collectively, that is as a whole. Also, as I type and auto complete pops up with an option, if I press the tab key, it won't add it in all cursors, but only to the last pointed cursor.

I will try to make a small video to show you what I mean.
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 09, 2013, 05:33:41 pm
I will try to make a small video to show you what I mean.
No need, just test in Scite and if doesn't work there then report on the scintilla bug tracker or mailing list.
The code completion issue is know problem by the scintilla devs and they don't intend to fix it, because
there is no clear way to implement it. Probably we should try something, but I have no time at the moment.
Title: Re: Margins and Caret issue
Post by: stefanos_ on June 09, 2013, 05:36:26 pm
OK, cheers. I will disable it then. I got inspired by other editors which to such thing and found it extremely useful.

Oh well, maybe we could do something about it :)
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 09, 2013, 05:50:50 pm
Why would you disable it? It has some limitations, but it is pretty useful for editing common code.
Especially if you use the Edit -> Select next occurrence and Edit -> Select skip to next occurrence :)

If you have time you can try to fix some of the issues and post patches either here or to Scintilla devs.
Title: Re: Margins and Caret issue
Post by: stefanos_ on June 09, 2013, 06:24:45 pm
HAHAHAH :D your suggestion is buggy! I highlight the keyword of my choice, press Ctrl-Shift-E to skip to the next occurrence and start typing a new string name and it adds it nested in itself next to header file on the first line.

Don't tell me it's Scintilla's problem..AGAIN! :D hahaha this is hilarious!
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 09, 2013, 06:33:25 pm
HAHAHAH :D your suggestion is buggy!
It is not funny, please post the exact steps to reproduce the problem and please post a sample source file.

No it is not scintilla problem.

p.s. I've reproduced it.
Title: Re: Margins and Caret issue
Post by: Jenna on June 09, 2013, 06:49:27 pm
On more issue with this (Ctrl+E and CTRL+SHIFT+E): it seems to override the settings in Margins and caret about multiple-selections and typing in it, and creates multiple carets, where I can type and delete.
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 09, 2013, 07:32:51 pm
Jens:
It does, so because this feature is useless if you cannot type.
Also do you have a use case for multiple selections without allowing typing?
Title: Re: Margins and Caret issue
Post by: MortenMacFly on June 10, 2013, 09:06:38 am
Also do you have a use case for multiple selections without allowing typing?
Copy&Paste - I do it rather often.
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 10, 2013, 10:14:36 am
Morten: Can you show a sample steps, where this is useful, I'm curious?
Title: Re: Margins and Caret issue
Post by: MortenMacFly on June 11, 2013, 07:28:14 am
Morten: Can you show a sample steps, where this is useful, I'm curious?
Yes, for comments, for example if you have embedded (LaTeX) descriptions like formulas or images / tables.
Title: Re: Margins and Caret issue
Post by: oBFusCATed on June 12, 2013, 11:09:22 pm
HAHAHAH :D your suggestion is buggy! I highlight the keyword of my choice, press Ctrl-Shift-E to skip to the next occurrence and start typing a new string name and it adds it nested in itself next to header file on the first line.
This should be fixed in trunk now.
Title: Re: Margins and Caret issue
Post by: stefanos_ on June 13, 2013, 12:22:02 pm
HAHAHAH :D your suggestion is buggy! I highlight the keyword of my choice, press Ctrl-Shift-E to skip to the next occurrence and start typing a new string name and it adds it nested in itself next to header file on the first line.
This should be fixed in trunk now.

OK, I will compile it right now and will let you know. Cheers :)

UPDATE: It stopped compiling after detected errors.

Code
../../include/prep.h:221:16: error: expected unqualified-id before numeric constant
../../include/prep.h:227:16: error: expected unqualified-id before numeric constant