godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.01k stars 21.17k forks source link

`auto_brace_complete` does not wrap selected text with the desired characters anymore (unlike `3.x`) #56581

Closed BeayemX closed 2 years ago

BeayemX commented 2 years ago

Godot version

v4.0.dev.custom_build [897afb69a]

System information

Linux Mint - Vulkan API 1.2.131 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080

Issue description

When trying to wrap selected text in quotes or parenthesis (or any other character of that nature) it will not wrap the selected text in the desired characters but instead replace the selected text with the pressed character.

This behavior occurs regardless of the value of the editor setting auto_brace_complete.

image

Steps to reproduce

  1. Select any text in the code editor
  2. Press (

Minimal reproduction project

No response

theoniko commented 2 years ago

Hello @Chaosus , Could you please give more details i.e. which files are relevant?

jmb462 commented 2 years ago

When trying to wrap selected text in quotes or parenthesis (or any other character of that nature) it will not wrap the selected text in the desired characters but instead replace the selected text with the pressed character.

Is it not the expected behaviour ?

auto_brace_complete should do more than adding a closing brace when typing an opening one ?

BeayemX commented 2 years ago

At least in Godot 3 auto_brace_complete is responsible for toggling the behavior as I described it.
Therefore I would say it is a regression.