Author Topic: Bug in "moving"  (Read 5849 times)

Offline Hardi

  • Multiple posting newcomer
  • *
  • Posts: 18
Bug in "moving"
« on: September 03, 2006, 04:36:17 pm »
Hi. I found this little bug that occours on creating new brackets. It's hard to explain it, so I'll just give you the key sequences that you need to type in to an empty C::B file:
[TAB]if()[ENTER]{[ENTER]}[ARROW_UP]
and the 2nd one(empty the file first!):
[TAB]if()[ENTER]{[ENTER]}[ARROW_RIGHT][ARROW_UP]
Notice the difference between the first final state and the last? In the first case, the position of the cursor differs from the last.

Offline Phatency

  • Multiple posting newcomer
  • *
  • Posts: 65
Re: Bug in "moving"
« Reply #1 on: September 03, 2006, 08:38:53 pm »
Notice the difference between the first final state and the last? In the first case, the position of the cursor differs from the last.
No, I seriously don't :P

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Bug in "moving"
« Reply #2 on: September 03, 2006, 09:25:53 pm »
I can't see anything going wrong  :shock:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Bug in "moving"
« Reply #3 on: September 03, 2006, 10:38:01 pm »
I don't, too. Could you explain any further? What C::B are you using, what OS? For me it just works fine. (C::B r2946 on WinXP.)
With regards, Morten.
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 Hardi

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Bug in "moving"
« Reply #4 on: September 06, 2006, 04:19:40 pm »
I am using Xp, CB version 1.0 and build: oct 24 2005 23:49 - wx2.6.1 should be the latest version.

Write the following scheme in C::B! (without "" ofcourse. And DON'T TYPE THE | CHARACTER! That character indicates the location of the cursor after typing.). There is a tab in front of if() and the { } are automatically aligned under if, after you have typed them in of course:
"   if ()
   {
   }|"

Now if I press the [ARROW_UP] button, the screen will look like this:
"   if ()
|  {
   }"

You see, the cursor jumps to the beginning of the row - but it should be after the { character.
Now, let's go back to the situation where I haven't pushed the [ARROW_UP] button(You have to recreate the whole scene, because if you set the cursor back by hand, the bug won't work anymore. If I press [ARROW_RIGHT] once and then [ARROW_UP] the cursor will go after the { sign like this:
"   if ()
   {|
   }"

And this is what it should do WITHOUT pressing the [ARROW_RIGHT] button. (The ARROW_RIGHT button is just for making the CB understand that I have moved the cursor and now the cursor IS after the } sign and when I press arrow up, then it has to go after { - without making the CB realise that it actually IS after the } sign, it won't go to the right place if I push arrow up.

if you still don't get it, here's a detailed view of what keys you should press when in a TOTALLY empty file. DOn't make any extra characters(including newlines or tabs):
[TAB]['i']['f'][' ']['('][')'][ENTER/RETURN]['{'][ENTER]['}'] now the thing you should see in the file should look like the first scheme in this post.
Now press the [ARROW_UP] button. The cursor wont' go AFTER the { sign, it will jump to the beginning of the line!
Noww place the arrow back after the } sign and press [ARROW_UP] again. Now it WILL go after the { sign and this is what it should do in the first place!

I hope you understood :)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Bug in "moving"
« Reply #5 on: September 06, 2006, 04:29:34 pm »
I stil lcan't reproduce this, all is going well, maybe we have different settings : editor settings : general tab

my case : tab options : both selected
indent options : first 3 checked

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2775
Re: Bug in "moving"
« Reply #6 on: September 06, 2006, 04:32:48 pm »
I am using Xp, CB version 1.0 and build: oct 24 2005 23:49 - wx2.6.1 should be the latest version.

Hardi, you might want to use a build that's not almost a year old.

//-- Installing Code::Blocks from source on Windows
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows

   
//-- Nightly Builds
http://forums.codeblocks.org/index.php?board=20.0

« Last Edit: September 06, 2006, 04:38:46 pm by Pecan »

Offline Hardi

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Bug in "moving"
« Reply #7 on: September 06, 2006, 06:54:16 pm »
I am using Xp, CB version 1.0 and build: oct 24 2005 23:49 - wx2.6.1 should be the latest version.

Hardi, you might want to use a build that's not almost a year old.

//-- Installing Code::Blocks from source on Windows
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows

   
//-- Nightly Builds
http://forums.codeblocks.org/index.php?board=20.0



Thanks for advice. I thought the installer on the index page is the best one, but now I see that nightly builds are better ;). I got the latest build and there is no more "problem in moving"