Author Topic: Autocomplete deletes code on the right side of the line.  (Read 3030 times)

Offline kotvkvante

  • Single posting newcomer
  • *
  • Posts: 3
Autocomplete deletes code on the right side of the line.
« on: February 14, 2024, 07:06:03 pm »
Autocomplete deletes code on the right side of the line.
I don't want codeblocks to behave this way =(



I find exact same problem in VS code issues:
https://github.com/microsoft/vscode-cpptools/issues/10553
I failed to find similar option in CB editor settings   

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Autocomplete deletes code on the right side of the line.
« Reply #1 on: February 15, 2024, 03:37:54 am »
I'm really not quite understand the problem.

It looks like the macro definition "WINDOW_HEIGHT" is defined some where before this line? Not in the same line?

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1635
Re: Autocomplete deletes code on the right side of the line.
« Reply #2 on: February 15, 2024, 09:34:33 am »
It is not deleted, just covered by a wide window with the same colour as background's one.

Offline kotvkvante

  • Single posting newcomer
  • *
  • Posts: 3
Re: Autocomplete deletes code on the right side of the line.
« Reply #3 on: February 15, 2024, 10:25:47 am »
look at github issue.

Offline kotvkvante

  • Single posting newcomer
  • *
  • Posts: 3
Re: Autocomplete deletes code on the right side of the line.
« Reply #4 on: February 15, 2024, 10:47:33 am »
Autocompletion in #define removes everything on right side  ..  Expected behavior in second example. Everything on the right side remains the same

https://youtu.be/dXB4g8tLvYI

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Autocomplete deletes code on the right side of the line.
« Reply #5 on: February 16, 2024, 10:49:48 am »
Autocompletion in #define removes everything on right side  ..  Expected behavior in second example. Everything on the right side remains the same

https://youtu.be/dXB4g8tLvYI

OK, I see the issue now by the screencast. Thanks.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.