Author Topic: 'UNDO' bug ([CTRL] + Z)  (Read 2373 times)

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
'UNDO' bug ([CTRL] + Z)
« on: 2010-Nov-30 »
I haven't seen anybody else mention this yet, and it's been happening for quite a while now.
A lot of times when I hit [CTRL] + Z (undo), instead of undoing the latest change, it actually undoes the latest two changes.
This is on multiple lines, which I know it shouldn't do.
It's like the undo buffer is brought back two steps instead of one.

It's not every time, but it happens about once a day.
This can be potentially dangerous because sometimes it may not be obvious and you may not notice the second undo.
Just wondering if anybody else experienced this?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1791
    • View Profile
    • Homepage
Re: 'UNDO' bug ([CTRL] + Z)
« Reply #1 on: 2010-Nov-30 »
I had some similar problem with the undo when I started with GLBasic a few years ago but I could never really point at it, just seemed to be things missing after I did undo sometimes so never reported it.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 'UNDO' bug ([CTRL] + Z)
« Reply #2 on: 2010-Nov-30 »
it is a bug. It tries to accumulate key presses and generates new undo groups for "I have no real idea when". And sometimes it's broken.

I really should try to fix that, because it really annoys me as well. But I can't really reproduce it. So, if anyone has a way to reproduce it, please give me!

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: 'UNDO' bug ([CTRL] + Z)
« Reply #3 on: 2010-Nov-30 »
I thought it was me, holding the keys down too long  :D
I came. I saw. I played.

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
Re: 'UNDO' bug ([CTRL] + Z)
« Reply #4 on: 2010-Nov-30 »
I thought it was just me!!
I could never reproduce it, but didn't really try too hard.

But, I just found that this works for me every time (or at least twice in a row):

- Edit a line by adding a few characters (in the middle of a word if it makes a difference or not)
   (don't hit enter)

- Click another line (I tried lines above and also below that line and both do it)

- Add a few characters to a word in the new line (don't hit enter)

- Click undo [CTRL] + Z

That undoes both edits on both lines.
Good luck!

[Edit]
After a few more tests it seems that it happens when you don't hit the enter key and click on a new line.
It's like the enter key is the only way it knows to start a new undo group.
« Last Edit: 2010-Nov-30 by Slydog »
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 'UNDO' bug ([CTRL] + Z)
« Reply #5 on: 2010-Nov-30 »
OK, now please get yourself a "buy me a beer" button. True genius! Found the bug of the decade!

 :booze: