fix saving file on linux

This commit is contained in:
Matt Parker
2025-11-10 21:16:33 +10:00
parent 608f4b6f11
commit 48b263bb08
2 changed files with 3 additions and 1 deletions

View File

@@ -401,6 +401,7 @@ public partial class SharpIdeCodeEdit : CodeEdit
// Let each open tab respond to this event // Let each open tab respond to this event
if (@event.IsActionPressed(InputStringNames.SaveAllFiles)) if (@event.IsActionPressed(InputStringNames.SaveAllFiles))
{ {
AcceptEvent();
_ = Task.GodotRun(async () => _ = Task.GodotRun(async () =>
{ {
await _fileChangedService.SharpIdeFileChanged(_currentFile, Text, FileChangeType.IdeSaveToDisk); await _fileChangedService.SharpIdeFileChanged(_currentFile, Text, FileChangeType.IdeSaveToDisk);
@@ -418,6 +419,7 @@ public partial class SharpIdeCodeEdit : CodeEdit
} }
else if (@event.IsActionPressed(InputStringNames.SaveFile) && @event.IsActionPressed(InputStringNames.SaveAllFiles) is false) else if (@event.IsActionPressed(InputStringNames.SaveFile) && @event.IsActionPressed(InputStringNames.SaveAllFiles) is false)
{ {
AcceptEvent();
_ = Task.GodotRun(async () => _ = Task.GodotRun(async () =>
{ {
await _fileChangedService.SharpIdeFileChanged(_currentFile, Text, FileChangeType.IdeSaveToDisk); await _fileChangedService.SharpIdeFileChanged(_currentFile, Text, FileChangeType.IdeSaveToDisk);

View File

@@ -53,7 +53,7 @@ FindInFiles={
} }
SaveFile={ SaveFile={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
] ]
} }
SaveAllFiles={ SaveAllFiles={