copying selection trims trailing whitespace

This is configurable with `clipboard-trim-trailing-spaces`.

This also fixes a bug where debug builds would crash when copying blank
lines. This never affected release builds.
This commit is contained in:
Mitchell Hashimoto
2022-11-22 21:27:05 -08:00
parent 03fdb38a96
commit 70b017200a
3 changed files with 114 additions and 9 deletions

View File

@@ -148,6 +148,10 @@ pub const Config = struct {
@"clipboard-read": bool = false,
@"clipboard-write": bool = true,
/// Trims trailing whitespace on data that is copied to the clipboard.
/// This does not affect data sent to the clipboard via "clipboard-write".
@"clipboard-trim-trailing-spaces": bool = true,
/// The time in milliseconds between clicks to consider a click a repeat
/// (double, triple, etc.) or an entirely new single click. A value of
/// zero will use a platform-specific default. The default on macOS