1 parent 292bfd7 commit 362bb7dCopy full SHA for 362bb7d
2 files changed
Core.hs
@@ -324,7 +324,7 @@ jump :: Int -> IO ()
324
jump = jumpFn . const
325
326
-- | Jump to relative place, 0 to 1.
327
-jumpRel :: Float -> IO ()
+jumpRel :: Rational -> IO ()
328
jumpRel r | r < 0 || r >= 1 = pure ()
329
| True = modifyHS_ $ \st ->
330
st { cursor = floor $ fromIntegral (size st) * r }
Keymap.hs
@@ -65,7 +65,7 @@ mainMode = KeyMap \c -> getsHS modal >>= \case
65
| c `elem` ['H', ';'] ->
66
showHist $> mainMode
67
| c >= '1' && c <= '9' ->
68
- jumpRel (0.1 * fromIntegral (fromEnum c - 48)) $> mainMode
+ jumpRel (fromIntegral (fromEnum c - 48) / 10) $> mainMode
69
| True -> sequence_ (M.lookup c keyMap) $> mainMode
70
71
0 commit comments