Merge pull request #107872 from Thought-Weaver/users/loganapple/editor-caret-fix

[Autocomplete] Avoid prepending literals when the character has already been typed
This commit is contained in:
Thaddeus Crews 2025-07-10 11:39:30 -05:00
commit c977b597b8
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
5 changed files with 104 additions and 23 deletions

View file

@ -0,0 +1,11 @@
[input]
add_node_path_literals=true
[output]
include=[
{"insert_text": "\"property_of_a\""},
{"insert_text": "\"name\""},
]
exclude=[
{"insert_text": "^\"property_of_a\""},
{"insert_text": "^\"name\""},
]

View file

@ -0,0 +1,8 @@
extends Node
const A = preload("res://completion/class_a.notest.gd")
func _ready() -> void:
var a := A.new()
var tween := get_tree().create_tween()
tween.tween_property(a, ^"")

View file

@ -0,0 +1,9 @@
[input]
add_string_name_literals=true
[output]
include=[
{"insert_text": "\"test_input_action\""},
]
exclude=[
{"insert_text": "&\"test_input_action\""},
]

View file

@ -0,0 +1,3 @@
func _input(event: InputEvent) -> void:
event.is_action_pressed(&"")
pass