Skip to content

Commit e532243

Browse files
authored
fix(scripts): sealed step indentation lost after cog edit (#161)
## Summary - Fix #159 — updating a sealed script step via the cog icon replaced the document line without preserving its block indentation (If/Loop nesting). The fix extracts the existing line's leading whitespace before applying the new display text. ## Test plan - [x] New test `UpdateSealedXml_PreservesBlockIndentation` passes - [x] All 457 existing tests pass - [x] Manual: open a script with sealed steps inside If/Loop blocks, edit one via the cog icon, verify indentation is preserved
1 parent 5ab4f3a commit e532243

13 files changed

Lines changed: 28 additions & 54 deletions

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,14 @@ SharpFM supports plugins via the `SharpFM.Plugin` contract library. Plugins are
8686

8787
### Writing a Plugin
8888

89-
1. Create a .NET 8 class library referencing `SharpFM.Plugin`.
89+
1. Create a .NET 10 class library referencing `SharpFM.Plugin`.
9090
2. Implement `IPanelPlugin` -- provide an `Id`, `DisplayName`, `CreatePanel()` returning an Avalonia `Control`.
9191
3. Use `IPluginHost` in `Initialize()` to observe clip selection changes and content updates.
9292
4. Optionally register keyboard shortcuts via `KeyBindings` and custom menu actions via `MenuActions`.
9393
5. Build the DLL and drop it in the `plugins/` directory.
9494

9595
See `src/SharpFM.Plugin.Sample/` for a complete working example.
9696

97-
### Plugin License
98-
99-
While SharpFM is licensed under GPL v3, plugins that communicate solely through the interfaces in `SharpFM.Plugin` are not required to be GPL-licensed. See the plugin interface source files for the full exception clause.
100-
10197
## Troubleshooting
10298

10399
Logs are stored in `${specialfolder:folder=CommonApplicationData}\SharpFM` and are automatically rotated after thirty days.

docs/plugins/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ SharpFM supports four types of plugins, all sharing a common base interface (`IP
1515

1616
### 1. Create a Class Library
1717

18-
Create a new .NET 8 class library and reference `SharpFM.Plugin`:
18+
Create a new .NET 10 class library and reference `SharpFM.Plugin`:
1919

2020
```xml
2121
<Project Sdk="Microsoft.NET.Sdk">
2222
<PropertyGroup>
23-
<TargetFramework>net8.0</TargetFramework>
23+
<TargetFramework>net10.0</TargetFramework>
2424
</PropertyGroup>
2525
<ItemGroup>
2626
<ProjectReference Include="path/to/SharpFM.Plugin.csproj" />
@@ -48,4 +48,4 @@ SharpFM scans the `plugins/` directory at startup for `.dll` files. Each assembl
4848

4949
## Licensing
5050

51-
The `SharpFM.Plugin` project is GPL with a **plugin exception**: plugins that implement these interfaces are not subject to the GPL and may use any license, including proprietary.
51+
SharpFM and its plugin interfaces are licensed under the GNU General Public License v3.

src/SharpFM.Plugin/ClipContentChangedArgs.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using SharpFM.Model;
72

83
namespace SharpFM.Plugin;

src/SharpFM.Plugin/IClipTransformPlugin.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using System.Threading.Tasks;
72

83
namespace SharpFM.Plugin;

src/SharpFM.Plugin/IEventPlugin.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
namespace SharpFM.Plugin;
72

83
/// <summary>

src/SharpFM.Plugin/IPanelPlugin.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using Avalonia.Controls;
72

83
namespace SharpFM.Plugin;

src/SharpFM.Plugin/IPersistencePlugin.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using SharpFM.Model;
72

83
namespace SharpFM.Plugin;

src/SharpFM.Plugin/IPlugin.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using System;
72
using System.Collections.Generic;
83

src/SharpFM.Plugin/IPluginHost.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using System;
72
using System.Collections.Generic;
83
using Microsoft.Extensions.Logging;

src/SharpFM.Plugin/PluginKeyBinding.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file is part of SharpFM and is licensed under the GNU General Public License v3.
2-
//
3-
// Plugin Exception: You may create plugins that implement these interfaces without those
4-
// plugins being subject to the GPL. Such plugins may use any license, including proprietary.
5-
61
using System;
72

83
namespace SharpFM.Plugin;

0 commit comments

Comments
 (0)