An extra indentation is added in the practice exercise, code editor.
When the expressions, but not the first indentation, are removed under a function header.
Click at the end of the second line to place the cursor (shown as a vertical bar | below) after the word pass
func take_damage(amount):
pass|
Press ctrl backspace to erase the word to the left.
Expected behavior
Only the text pass should be removed, without adding a second indentation.
func take_damage(amount):
|
Observed
A second indentation was added.
func take_damage(amount):
|
Information about your device (please complete the following information):
Operating System: Windows 21H1
Browser: Microsoft Edge | 97.0.1072.69 (Official build) (64-bit)
Additional context
The issue can be repeated by:
modifying the first line, for example by:
adding and removing a character or a space,
or by making a modification and undoing it ctrl z
or by reloading the whole page by pressing the browsers refresh button.
But the issue can't be reproduced after:
pressing the Reset button (below the code editor).
or after pressing ctrl z to undo any modification on the second line.
or by retyping the second line (one indentation and the text pass)
As demonstrated below, this issue isn't limited to pressing ctrl backspace.
The same thing happens when selecting the expressions, after the second line's indentation,
to the end of the code editor's last line.
And pressing backspace or delete.
(see the examples below)
The issue isn't limited to the practice exercise in lesson 9.
It probably happens in all exercises that use the code editor.
Describe the bug
An extra indentation is added in the practice exercise, code editor. When the expressions, but not the first indentation, are removed under a function header.
To Reproduce
Steps to reproduce the bug:
|
below) after the wordpass
ctrl backspace
to erase the word to the left.Expected behavior
Only the text
pass
should be removed, without adding a second indentation.Observed
A second indentation was added.
Information about your device (please complete the following information):
Additional context
The issue can be repeated by:
ctrl z
But the issue can't be reproduced after:
Reset
button (below the code editor).ctrl z
to undo any modification on the second line.pass
)As demonstrated below, this issue isn't limited to pressing
ctrl backspace
.The same thing happens when selecting the expressions, after the second line's indentation, to the end of the code editor's last line. And pressing
backspace
ordelete
. (see the examples below)The issue isn't limited to the practice exercise in lesson 9. It probably happens in all exercises that use the code editor.
For example, in the first lesson: https://gdquest.github.io/learn-gdscript/#course/lesson-1-what-code-is-like/practice-55916.tres
Select:
print("Welcome!")
Press:backspace
ordelete
The selected text was replaced with an extra indentation:It also happens in lesson 6, which has multiple lines in the function. https://gdquest.github.io/learn-gdscript/#course/lesson-6-multiple-function-parameters/practice-qAYVjotx.tres
Select from the second line, after the first indentation, to the end of the last line:
[
]
Press
backspace
The selected text was replaced with an extra indentation.Another example is to just leave a single indentation on the second line:
backspace
backspace
again