Closes #14700 #8164
Release Notes:
- Added `soft_wrap` value `bounded`,EditorWidth and PreferredLineLength
min value
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
@@ -510,6 +510,8 @@
// "soft_wrap": "editor_width",
// 4. Soft wrap lines at the preferred line length.
// "soft_wrap": "preferred_line_length",
+ // 5. Soft wrap lines at the preferred line length or the editor width (whichever is smaller).
+ // "soft_wrap": "bounded",
"soft_wrap": "prefer_line",
// The column at which to soft-wrap lines, for buffers where soft-wrap
// is enabled.
@@ -379,10 +379,12 @@ pub enum SoftWrap {
None,
/// Prefer a single line generally, unless an overly long line is encountered.
PreferLine,
- /// Soft wrap lines that overflow the editor
+ /// Soft wrap lines that exceed the editor width
EditorWidth,
/// Soft wrap lines at the preferred line length
PreferredLineLength,
+ /// Soft wrap line at the preferred line length or the editor width (whichever is smaller)
+ Bounded,
}
/// Controls the behavior of formatting files when they are saved.