Author Topic: Margins and Caret issue  (Read 19446 times)

stefanos_

  • Guest
Margins and Caret issue
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_

  • Guest
Re: Margins and Caret issue
« Reply #2 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 :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #3 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_

  • Guest
Re: Margins and Caret issue
« Reply #4 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #5 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.
« Last Edit: June 09, 2013, 06:35:23 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Margins and Caret issue
« Reply #6 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #7 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?
« Last Edit: June 09, 2013, 07:45:59 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Margins and Caret issue
« Reply #8 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #9 on: June 10, 2013, 10:14:36 am »
Morten: Can you show a sample steps, where this is useful, I'm curious?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Margins and Caret issue
« Reply #10 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Margins and Caret issue
« Reply #11 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_

  • Guest
Re: Margins and Caret issue
« Reply #12 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
« Last Edit: June 13, 2013, 01:57:28 pm by ToApolytoXaos »