fix left arrow key (#92)

* fix left arrow key

* remove LambdaCase
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2021-04-11 09:55:57 +01:00
1 parent dbe1c4a781
commit 07410990a0
2 files changed
+4 -6

No files matched your search

+4 -4
View File
@@ -87,10 +87,10 @@ updateTermState ac tw (key, ms) ts@TerminalState {inputString = s, inputPosition
| p == 0 = ts' (tail s, 0)
| otherwise = let (b, a) = splitAt p s in ts' (b <> tail a, p)
leftPos
| ms == mempty = min (length s) (p + 1)
| ms == shiftKey = length s
| ms == ctrlKey = nextWordPos
| ms == altKey = nextWordPos
| ms == mempty = max 0 (p - 1)
| ms == shiftKey = 0
| ms == ctrlKey = prevWordPos
| ms == altKey = prevWordPos
| otherwise = p
rightPos
| ms == mempty = min (length s) (p + 1)
-2
View File
@@ -1,5 +1,3 @@
{-# LANGUAGE LambdaCase #-}
module Styled
( StyledString (..),
bPlain,