NO

Author Topic: IDE auto indentation bug  (Read 4570 times)

ssb

  • Guest
IDE auto indentation bug
« on: September 11, 2005, 12:37:32 PM »
Hust noticed the following minor bug using PellesC 4.00.43

When minimize and then restore IDE, cursor position defaults to first column. Same happens when switching back and forth, PellesC window and other applications.

As an example...

Maximize IDE
Type a bracket and Enter to make cursor ident to right.
Code: [Select]
int main() {
   |

Switch or minimize and then restore IDE window
Cursor now is displayed on the leftmost column.
Code: [Select]
int main() {
|


I hope it helps

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
IDE auto indentation bug
« Reply #1 on: September 11, 2005, 02:42:58 PM »
Thanks for the info - I will look at it.

I think the problem is that I don't want to insert the indent spaces/tabs until something is actually typed on the line - if Enter is pressed, I just want an empty line (not spaces/tabs + newline). The caret position is "faked" when showing the indent position, while waiting for the next typed character. It's a "mode" which I probably kill when switching away to another window. When switching back, the "real" position will be used (at the beginning, since the line is really empty).

Pelle
/Pelle

ssb

  • Guest
IDE auto indentation bug
« Reply #2 on: September 12, 2005, 08:55:04 AM »
Hmm, I know what you mean.
Maybe some cursor repositioning on editor window paint handler would did the trick. I'm sure you know better.

Thanks

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
IDE auto indentation bug
« Reply #3 on: September 12, 2005, 05:27:09 PM »
Luckily the mode was reset when switching back to the window - which is much easier to detect and handle. I think it's working now. I will try to upload a new beta this week...

Pelle
/Pelle

ssb

  • Guest
IDE auto indentation bug
« Reply #4 on: September 12, 2005, 05:46:07 PM »
Thanks Pelle,

You really did fine job with PellesC !

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
IDE auto indentation bug
« Reply #5 on: September 12, 2005, 10:27:46 PM »
Thanks!

Pelle
/Pelle