Pencil: a redraw on an open path follows the way its ends run along it (#3793)

A stroke that starts and ends on an open path away from its ends now looks
at the way it runs along the path at each end. Where it starts it replaces
the part it runs along; where it lands it joins the part it runs into. So it
replaces the part between (and the path stays open), keeps the part between
and closes the path along the stroke, or, when its two ends disagree, keeps
the start's choice and ends where the pen is lifted.

An end runs along the path when its first stretch, as long as Edit Selected
Paths' distance, stays within that distance and moves along the path more
than away from it. An end that leaves or meets the path squarely follows the
other end; when both do, the stroke closes the path only if it goes round
both pieces beyond its ends.

This brings back closing across an open shape's opening (a C drawn over both
arms closes into a ring), which the previous commit had taken out, and keeps
a bump over an L's corner redrawing the corner.
This commit is contained in:
ncic
2026-11-23 04:58:44 +01:00
parent aea7ae116a
commit 563cbb298c
5 changed files with 248 additions and 19 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Pencil",
[],
None,
"{points: [[x,y]…] or [[x,y,pressure]…] or [[x,y,pressure,tiltX,tiltY,rotation,wheel]…] (pen pressure 0..1: the stroke keeps it, for Calligraphic and Scatter brushes with Pressure variation; a point without one presses fully. Pen tilt in degrees, each −90..90, x positive leaning right and y leaning down the page, and barrel rotation in degrees clockwise, 0..360: the stroke keeps how far the pen leaned, which way and how far its barrel turned, for brushes with Tilt, Bearing and Rotation variation. An airbrush pen's finger wheel 0..1: the stroke keeps it for brushes with Stylus Wheel variation, a point without one half way; null for what a point lacks. A pressure, tilt, rotation or wheel outside its range, or a point array of more than seven numbers, is an error), fidelity?: pt (1.5; from 0.000015625 (0.01 / 640) to 100 / 0.0313 (about 3194.89), the Pencil's and the Paintbrush's 0.01 to 100 px Fidelity at the highest and the lowest zoom; a value outside that range is an error. The tools send their Fidelity in pixels divided by the zoom, kept within the range), fit?: bool (true; false: the points are joined by straight segments, as the Pencil previews a stroke with Live curve fitting off), closed?, style?: \"pencil\" (default) | \"brush\", fill?: bool, keepSelected?: bool (true: the drawn or continued path is selected; false: a new path leaves nothing selected, and a continued or redrawn one is deselected while the rest of the selection stays), leaveSelection?: bool (false; true with keepSelected false: a new path leaves the selection as it is, as the Pencil previews a stroke that redraws a path), extend?: {id, end?: \"end\" (default) | \"start\"}, connect?: {id, end: \"start\"|\"end\"} (only with extend), redraw?: {id, within?: pt (12)}} fit a freehand stroke → {id}. extend continues the path from that end, and closes it when `closed` is true (left out, when the stroke ends within four Fidelities of the path's other end, 6 to 400 pt); with connect, the stroke ends on that end of another path's last open subpath and joins it on, in one path with the extended path's appearance (the other path is removed when nothing of it is left); redraw (Edit Selected Paths) replaces the section of the path between where the stroke starts and ends, each within `within` of one subpath (the way round a closed one that leaves the bigger shape; an open one stays open), the stroke's ends bent smoothly onto the path; a stroke that starts on it and returns to the same point adds a loop there, and one lifted farther than `within` from it takes the path with it: a closed subpath opens where the stroke starts, an open one is cut there and drops the part the stroke heads along, and the path ends where the stroke does. Any other style, extend end or connect end, connect without extend, and a connect that names no other path with an open end are errors, a stroke of one point included, and nothing changes",
"{points: [[x,y]…] or [[x,y,pressure]…] or [[x,y,pressure,tiltX,tiltY,rotation,wheel]…] (pen pressure 0..1: the stroke keeps it, for Calligraphic and Scatter brushes with Pressure variation; a point without one presses fully. Pen tilt in degrees, each −90..90, x positive leaning right and y leaning down the page, and barrel rotation in degrees clockwise, 0..360: the stroke keeps how far the pen leaned, which way and how far its barrel turned, for brushes with Tilt, Bearing and Rotation variation. An airbrush pen's finger wheel 0..1: the stroke keeps it for brushes with Stylus Wheel variation, a point without one half way; null for what a point lacks. A pressure, tilt, rotation or wheel outside its range, or a point array of more than seven numbers, is an error), fidelity?: pt (1.5; from 0.000015625 (0.01 / 640) to 100 / 0.0313 (about 3194.89), the Pencil's and the Paintbrush's 0.01 to 100 px Fidelity at the highest and the lowest zoom; a value outside that range is an error. The tools send their Fidelity in pixels divided by the zoom, kept within the range), fit?: bool (true; false: the points are joined by straight segments, as the Pencil previews a stroke with Live curve fitting off), closed?, style?: \"pencil\" (default) | \"brush\", fill?: bool, keepSelected?: bool (true: the drawn or continued path is selected; false: a new path leaves nothing selected, and a continued or redrawn one is deselected while the rest of the selection stays), leaveSelection?: bool (false; true with keepSelected false: a new path leaves the selection as it is, as the Pencil previews a stroke that redraws a path), extend?: {id, end?: \"end\" (default) | \"start\"}, connect?: {id, end: \"start\"|\"end\"} (only with extend), redraw?: {id, within?: pt (12)}} fit a freehand stroke → {id}. extend continues the path from that end, and closes it when `closed` is true (left out, when the stroke ends within four Fidelities of the path's other end, 6 to 400 pt); with connect, the stroke ends on that end of another path's last open subpath and joins it on, in one path with the extended path's appearance (the other path is removed when nothing of it is left); redraw (Edit Selected Paths) replaces the section of the path between where the stroke starts and ends, each within `within` of one subpath (the way round a closed one that leaves the bigger shape; on an open one the way the stroke runs along it at each end decides: it replaces the part it runs along where it starts and joins the part it runs into where it lands, so it replaces the part between, keeps it and closes the path along the stroke, or, when its ends disagree, ends where it is lifted; an end that leaves or meets the path squarely follows the other end, and when both do it closes only if it goes round both pieces beyond), the stroke's ends bent smoothly onto the path; a stroke that starts on it and returns to the same point adds a loop there, and one lifted farther than `within` from it takes the path with it: a closed subpath opens where the stroke starts, an open one is cut there and drops the part the stroke heads along, and the path ends where the stroke does. Any other style, extend end or connect end, connect without extend, and a connect that names no other path with an open end are errors, a stroke of one point included, and nothing changes",
has_doc,
freehand
),
+139 -7
View File
@@ -170,8 +170,9 @@ fn bend_ends(stroke: &mut [Point], a: Option<Point>, b: Option<Point>, reach: f6
/// stroke does. A closed subpath opens where the stroke starts and keeps its whole outline, run
/// so that it arrives there heading the stroke's way. An open subpath is cut there and keeps the
/// part behind the stroke: the part the stroke heads along is dropped. The subpath's index and its
/// new shape; None when the stroke doesn't start on `pd`.
fn redraw_extend(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64) -> Option<(usize, SubPath)> {
/// new shape; None when the stroke doesn't start on `pd`. `runs_up`, when given, says which part of
/// an open subpath the stroke heads along: the part towards its last anchor when true.
fn redraw_extend(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64, runs_up: Option<bool>) -> Option<(usize, SubPath)> {
let first = *pts.first()?;
let (si, _, _, _, d) = pd.nearest(first)?;
if d > within || pts.len() < 2 {
@@ -194,6 +195,8 @@ fn redraw_extend(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64) ->
cos < 0.0
} else if k == 0 || k == last {
k == 0
} else if let Some(up) = runs_up {
!up
} else if cos.abs() >= 0.34 {
cos < 0.0
} else {
@@ -265,13 +268,134 @@ fn redrawn_area(sp: &SubPath, start: usize, end: usize, stroke: impl Iterator<It
area.abs()
}
/// Which way a stroke runs along open subpath `sp` where it meets it: `stroke` starts at that end
/// of the stroke. It runs along when its first `within` of length stays within `within` of the
/// path and moves along the path more than away from it: Some(true) towards the subpath's last
/// anchor. None when it goes straight off (or onto) the path.
fn run_along(sp: &SubPath, mut stroke: impl Iterator<Item = Point>, within: f64) -> Option<bool> {
let one = PathData::single(sp.clone());
let p0 = stroke.next()?;
// The point `within` along the stroke, or its other end when it is shorter.
let (mut prev, mut len, mut q) = (p0, 0.0, p0);
for p in stroke {
let step = prev.distance(p);
if len + step >= within && step > 0.0 {
q = prev.lerp(p, (within - len) / step);
break;
}
len += step;
prev = p;
q = p;
}
let (_, s0, t0, on0, _) = one.nearest(p0)?;
let (_, s1, t1, on1, away) = one.nearest(q)?;
if away > within || on0.distance(on1) <= away {
return None;
}
Some(s1 as f64 + t1 > s0 as f64 + t0)
}
/// What a stroke from anchor `from` to anchor `to` of open subpath `sp` does to it.
enum OpenRedraw {
/// Replaces the part between and leaves the path open.
Replace,
/// Keeps the part between, drops the pieces beyond and closes the path with the stroke.
Close,
/// Drops the part it starts along (towards the last anchor when true) and ends where it does.
Extend(bool),
}
/// Pencil's Edit Selected Paths on an open subpath: what a stroke from anchor `from` to anchor `to`
/// of `sp` does, from the way it runs along the path at each end ([`run_along`]; `before` is the
/// subpath before the anchors at `from` and `to` were added). Where it starts, it replaces the part
/// it runs along; where it lands, it joins the part it runs into and the part behind goes. An end
/// that goes straight off or onto the path follows the other end. When both do, it closes only if
/// the shape it makes with the part between goes round both pieces beyond ([`goes_round`]). When
/// the two ends disagree, the start decides and the stroke's end stays where it is lifted.
fn open_redraw(before: &SubPath, sp: &SubPath, from: usize, to: usize, pts: &[Point], within: f64) -> OpenRedraw {
let up = to > from;
// Each end runs towards the last anchor (true) or the first. Running towards the other end
// of the stroke at the start, or on away from it where it lands, replaces the part between;
// the other way keeps the part between and closes the path.
let at_start = run_along(before, pts.iter().copied(), within);
let at_end = run_along(before, pts.iter().rev().copied(), within).map(|back| !back);
match (at_start, at_end) {
(Some(s), Some(e)) if s != e => OpenRedraw::Extend(s),
(Some(r), _) | (None, Some(r)) => {
if r == up {
OpenRedraw::Replace
} else {
OpenRedraw::Close
}
}
(None, None) => {
if goes_round(sp, from, to, pts) {
OpenRedraw::Close
} else {
OpenRedraw::Replace
}
}
}
}
/// Does the shape that stroke `pts` (from anchor `from` to anchor `to` of open subpath `sp`) makes
/// with the part of `sp` between them go round both pieces of `sp` beyond them? A piece counts as
/// inside when more of it lies inside than outside; a piece of no length counts as inside.
fn goes_round(sp: &SubPath, from: usize, to: usize, pts: &[Point]) -> bool {
use kurbo::{ParamCurve, Shape};
let (lo, hi) = (from.min(to), from.max(to));
let Some(middle) = sp.anchors.get_range(lo..=hi) else { return false };
let mut shape = PathData::single(SubPath::new(middle, false)).to_bezpath();
// The stroke runs from `hi` back to `lo` to close the shape.
let back: Vec<Point> = if from == lo { pts.iter().rev().copied().collect() } else { pts.to_vec() };
for p in back {
shape.line_to(p);
}
shape.close_path();
let inside = |segs: std::ops::Range<usize>| {
let (mut yes, mut no) = (0, 0);
for k in segs {
let seg = sp.segment(k);
for t in [0.25, 0.5, 0.75] {
if shape.winding(seg.eval(t)) != 0 { yes += 1 } else { no += 1 }
}
}
yes >= no
};
inside(0..lo) && inside(hi..sp.anchors.len().saturating_sub(1))
}
/// Closes open subpath `sp` with stroke `pts`, which runs from anchor `from` to anchor `to`: the
/// anchors between them stay, the pieces beyond go, and the stroke, its ends bent onto those
/// anchors ([`bend_ends`] over `within`), runs from one back to the other.
fn redraw_across_gap(sp: &SubPath, from: usize, to: usize, pts: &[Point], tol: Option<f64>, within: f64) -> Option<SubPath> {
let (lo, hi) = (from.min(to), from.max(to));
let (a_lo, a_hi) = (*sp.anchors.get(lo)?, *sp.anchors.get(hi)?);
let mut stroke = pts.to_vec();
if from == lo {
stroke.reverse();
}
bend_ends(&mut stroke, Some(a_hi.p), Some(a_lo.p), within);
let fit = stroke_subpath(&stroke, tol, false).anchors.into_vec();
let (Some(f0), Some(fl)) = (fit.first().copied(), fit.last().copied()) else { return None };
let mut anchors = sp.anchors.get_range(lo..=hi)?;
if let Some(a) = anchors.first_mut() {
*a = Anchor::with_handles(a.p, fl.h_in, a.h_out);
}
if let Some(a) = anchors.last_mut() {
*a = Anchor::with_handles(a.p, a.h_in, f0.h_out);
}
anchors.extend_from_slice(fit.get(1..fit.len().saturating_sub(1)).unwrap_or_default());
Some(SubPath::new(anchors, true))
}
/// Pencil's Edit Selected Paths in the middle of a path: a stroke that starts and ends within
/// `within` of a subpath of `pd` replaces the section between with the stroke fitted at `tol` (with
/// no `tol`, unfitted), its ends bent onto the path ([`bend_ends`]). On a closed subpath that is the
/// way round that leaves the bigger shape. On an open one it is the part between, and the path
/// stays open: it closes only from a stroke that starts at one of its ends and finishes on the
/// other. The subpath's index and its new shape; None when the stroke doesn't start and end on the
/// same subpath.
/// way round that leaves the bigger shape. On an open one the way the stroke runs along the path
/// at its ends decides ([`open_redraw`]): it replaces the part between, keeps the part between and
/// closes the path, or ends where it is lifted. The subpath's index and its new shape; None when
/// the stroke doesn't start and end on the same subpath.
fn redraw_section(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64) -> Option<(usize, SubPath)> {
let (first, last) = (*pts.first()?, *pts.last()?);
let (si, _, _, _, d_a) = pd.nearest(first)?;
@@ -283,6 +407,7 @@ fn redraw_section(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64) -
if sp.anchors.len() < 2 {
return None;
}
let before = sp.clone();
// Each point is looked up on the subpath as it is by then: splitting a straight segment makes
// two new ones, which a `t` along the old one doesn't measure.
let (mut from, _) = anchor_at(&mut sp, first)?;
@@ -294,6 +419,13 @@ fn redraw_section(pd: &PathData, pts: &[Point], tol: Option<f64>, within: f64) -
// The stroke starts and ends on the same point: it is a loop out of the path there.
return redraw_loop(sp, from, pts, tol, within).map(|sp| (si, sp));
}
if !sp.closed {
match open_redraw(&before, &sp, from, to, pts, within) {
OpenRedraw::Replace => {}
OpenRedraw::Close => return redraw_across_gap(&sp, from, to, pts, tol, within).map(|sp| (si, sp)),
OpenRedraw::Extend(up) => return redraw_extend(pd, pts, tol, within, Some(up)),
}
}
let n = sp.anchors.len();
// The stroke goes from `start` to `end` and replaces the run between them; `kept` runs from
// `end` round to `start`, then the stroke's inner anchors follow.
@@ -603,7 +735,7 @@ pub(crate) fn freehand_brushed(s: &mut Session, p: &Value, brush_name: Option<&s
// pen get redrawn.
// A stroke that ends back on the path redraws the section between; one that ends away from
// it takes the path with it (it is where the pen is lifted that decides).
if let Some((si, sp)) = redraw_section(&pd, &pts, fit_tol, within).or_else(|| redraw_extend(&pd, &pts, fit_tol, within)) {
if let Some((si, sp)) = redraw_section(&pd, &pts, fit_tol, within).or_else(|| redraw_extend(&pd, &pts, fit_tol, within, None)) {
// A member path of a compound path is redrawn in it: the compound path is what is
// selected, and what a brush paints.
let whole = brush_target(&s.doc()?.doc, id);
+105 -8
View File
@@ -6615,11 +6615,11 @@ fn a_stroke_leaving_an_open_path_across_it_drops_the_side_it_is_near() {
assert!(ends_at(sp, Point::new(100.0, 100.0), Point::new(290.0, 50.0), 0.5), "the long side stays: {sp:?}");
}
/// A stroke drawn across an open shape's opening, from near one end to near the other, redraws the
/// part between where it starts and ends, whichever way it is drawn: the ends stay and the shape
/// stays open. Only a stroke that starts at one end and finishes on the other closes it.
/// A stroke drawn over an open shape's open ends, from near one end to near the other, redraws
/// those ends along the stroke and closes the shape, whichever way it is drawn; the shape's body
/// between stays.
#[test]
fn a_stroke_across_an_open_shapes_opening_redraws_the_part_between_and_leaves_it_open() {
fn a_stroke_over_an_open_shapes_ends_closes_it_along_the_stroke() {
for reversed in [false, true] {
let mut s = session();
// A C open on the right: from the top right round the left to the bottom right.
@@ -6643,14 +6643,111 @@ fn a_stroke_across_an_open_shapes_opening_redraws_the_part_between_and_leaves_it
s.execute("path.freehand", &json!({"points": stroke, "redraw": {"id": id.0, "within": 4}})).unwrap();
assert_eq!(paths(&s).len(), 1, "reversed {reversed}: no new path");
let sp = &path(&s, id).subpaths[0];
assert!(!sp.closed, "reversed {reversed}: still open");
let (e1, e2) = (on(40.0), on(320.0));
assert!(ends_at(sp, Point::new(e1.0, e1.1), Point::new(e2.0, e2.1), 1.0), "reversed {reversed}: both ends stay: {sp:?}");
assert!(sp.closed, "reversed {reversed}: the shape closed");
let bb = kurbo::Shape::bounding_box(&path(&s, id).to_bezpath());
assert!(bb.x1 > 310.0 && bb.x0 > 200.0, "reversed {reversed}: the stroke in place of the C's body: {bb:?}");
assert!(bb.x1 > 310.0 && bb.x0 < 105.0, "reversed {reversed}: closed along the stroke, the body kept: {bb:?}");
// The old ends (at 40° and 320°) are gone.
for deg in [40.0, 320.0] {
let e = on(deg);
assert!(!sp.anchors.iter().any(|q| q.p.distance(Point::new(e.0, e.1)) < 1.0), "reversed {reversed}: the end at {deg}° is redrawn");
}
}
}
/// A stroke that starts and ends on an open path decides by the way it runs along the path at its
/// ends: where it starts it replaces the part it runs along, where it lands it joins the part it runs
/// into, an end that goes straight off or onto the path follows the other end, and when both do it
/// closes only round both pieces beyond. A stroke lifted away from the path ends there. The path is
/// an L whose bottom arm turns up and back over to a hook near the upright arm.
#[test]
fn a_redraw_on_an_open_path_follows_the_way_its_ends_run() {
// From the upright arm's top (100, 0) down, along the bottom, up the right side, back along the
// top to the hook, which ends at (160, 60).
let shape = [[100.0, 0.0], [100.0, 300.0], [400.0, 300.0], [400.0, 100.0], [160.0, 100.0], [160.0, 60.0]];
// A stroke through `pts`, a point every 2 pt, as a hand draws it.
let dense = |pts: &[[f64; 2]]| {
let mut out = vec![json!(pts[0])];
for w in pts.windows(2) {
let (a, b) = (Point::new(w[0][0], w[0][1]), Point::new(w[1][0], w[1][1]));
let n = (a.distance(b) / 2.0).ceil().max(1.0) as usize;
out.extend((1..=n).map(|i| {
let q = a.lerp(b, i as f64 / n as f64);
json!([q.x, q.y])
}));
}
out
};
let has = |sp: &vectorcraft_geom::SubPath, x: f64, y: f64| sp.anchors.iter().any(|a| a.p.distance(Point::new(x, y)) < 1.0);
// Over the loop above the path, from the top edge round to the left of the upright arm.
let over = [[250.0, 40.0], [200.0, -30.0], [100.0, -40.0], [40.0, 0.0]];
// Each: its name, the stroke, and whether the path is closed and keeps the bottom right corner,
// the upright arm's top and the hook's end.
let cases = [
// Runs along the top towards the hook, then up the upright arm: the hook goes, the end is
// left where the pen is lifted, on the arm, and the rest of the path stays.
(
"towards the hook, landing up the arm",
vec![[250.0, 100.0], [165.0, 100.0], [130.0, 95.0], [100.0, 90.0], [100.0, 40.0]],
[false, true, true, false],
),
// Runs along the top away from the hook, then lands running up the arm: the part between
// is replaced, both ends stay.
(
"away from the hook, landing up the arm",
vec![[250.0, 100.0], [300.0, 100.0], [320.0, 60.0], [250.0, 30.0], [140.0, 40.0], [100.0, 90.0], [100.0, 60.0]],
[false, false, true, true],
),
// Straight up off the top, over the arm's top, landing running down the arm: the arm's top and
// the hook go and the path closes round the rest.
(
"straight off, landing down the arm",
[&[[250.0, 100.0]][..], &over, &[[40.0, 120.0], [85.0, 140.0], [100.0, 150.0], [100.0, 180.0]]].concat(),
[true, true, false, false],
),
// Straight off and straight onto the arm, round both the arm's top and the hook: it closes.
("straight off and on, round both", [&[[250.0, 100.0]][..], &over, &[[40.0, 150.0], [100.0, 150.0]]].concat(), [true, true, false, false]),
// The same loop carried on across the arm and lifted inside: the path ends there; the hook,
// the shorter side, goes.
(
"across the arm, lifted away",
[&[[250.0, 100.0]][..], &over, &[[40.0, 150.0], [100.0, 150.0], [200.0, 160.0]]].concat(),
[false, true, true, false],
),
];
for (name, stroke, [closed, body, top, hook]) in cases {
let mut s = session();
let id = NodeId(s.execute("path.freehand", &json!({"points": shape, "fit": false})).unwrap()["id"].as_u64().unwrap());
s.execute("path.freehand", &json!({"points": dense(&stroke), "redraw": {"id": id.0, "within": 12}})).unwrap();
assert_eq!(paths(&s).len(), 1, "{name}: no new path");
let sp = &path(&s, id).subpaths[0];
assert_eq!(sp.closed, closed, "{name}: closed: {sp:?}");
assert_eq!(has(sp, 400.0, 300.0), body, "{name}: the bottom right corner: {sp:?}");
assert_eq!(has(sp, 100.0, 0.0), top, "{name}: the upright arm's top: {sp:?}");
assert_eq!(has(sp, 160.0, 60.0), hook, "{name}: the hook's end: {sp:?}");
}
}
/// A stroke that starts on an open C's upper arm running towards its end, goes round the opening
/// and lands on the lower arm running back into the C closes it into a ring.
#[test]
fn a_stroke_run_over_both_arms_of_a_c_closes_it() {
let mut s = session();
let on = |deg: f64| {
let a = deg.to_radians();
json!([200.0 + 100.0 * a.cos(), 200.0 - 100.0 * a.sin()])
};
let c: Vec<_> = (0..=28).map(|i| on(40.0 + 10.0 * f64::from(i))).collect();
let id = NodeId(s.execute("path.freehand", &json!({"points": c, "fidelity": 0.5})).unwrap()["id"].as_u64().unwrap());
let mut stroke: Vec<_> = (0..=8).map(|i| on(56.0 - 2.0 * f64::from(i))).collect();
stroke.extend([json!([300.0, 160.0]), json!([310.0, 200.0]), json!([300.0, 240.0])]);
stroke.extend((0..=8).map(|i| on(324.0 - 2.0 * f64::from(i))));
s.execute("path.freehand", &json!({"points": stroke, "redraw": {"id": id.0, "within": 4}})).unwrap();
let sp = &path(&s, id).subpaths[0];
assert!(sp.closed, "a ring: {sp:?}");
let bb = kurbo::Shape::bounding_box(&path(&s, id).to_bezpath());
assert!(bb.x0 < 105.0 && bb.x1 > 300.0, "the C's body and the stroke: {bb:?}");
}
/// A tall bump redrawn over most of an open line replaces that part: the ends beyond it stay and
/// the line stays open.
#[test]
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long