diff options
Diffstat (limited to 'src/animation.zig')
| -rw-r--r-- | src/animation.zig | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/animation.zig b/src/animation.zig index 764aa0b3..37d74813 100644 --- a/src/animation.zig +++ b/src/animation.zig @@ -1125,9 +1125,9 @@ pub const CursorGlide = struct { /// Heads for `box` at `now_ns`. /// How a new mark is gone to: eased (a step, or a jump's smear and - /// bow), landed at once, or moved whole at a scroll's pace (the text - /// moved under it, not the caret). - pub const How = enum { ease, land, rigid }; + /// bow), or landed at once (a scroll: the text moved under it, not the + /// caret; a shell carries it with the text's own glide). + pub const How = enum { ease, land }; pub fn aim(glide: *CursorGlide, box: Box, now_ns: u64, motion: Motion, how: How) void { // The same mark: nothing to do, unless a snap lands a glide under way. @@ -1152,11 +1152,9 @@ pub const CursorGlide = struct { // Leading: the corner ahead of the move, on the side it goes. const ahead = (point[0] - to_c[0]) * dx + (point[1] - to_c[1]) * dy; var own = motion; - own.omega *= if (how == .rigid) 1.5 else if (jump) pace * (if (ahead > 0) 1 else motion.follow) else pace * step_pace; - // A step neither winds up nor overshoots: it is a caret moving; - // nor a whole move with the text (rigid: at the view's pace, - // Glide's 1.5x, its corners together). - if (!jump or how == .rigid) { + own.omega *= if (jump) pace * (if (ahead > 0) 1 else motion.follow) else pace * step_pace; + // A step neither winds up nor overshoots: it is a caret moving. + if (!jump) { own.zeta = 1; own.anticipate = 0; } |
