summaryrefslogtreecommitdiff
path: root/jterm.hs
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2024-11-07 07:20:37 +1100
committerJustin Bedo <cu@cua0.org>2024-11-07 07:34:46 +1100
commit8262643bbc4db671b0f32ff1aa627c05bb8b4963 (patch)
tree05d504c2fb65bc1ca3bc34d096820ca1b465350b /jterm.hs
parent3d2bc90a09614223414a1e036ff2822d92f256c9 (diff)
scroll to top when deleting to top of buffer
Diffstat (limited to 'jterm.hs')
-rw-r--r--jterm.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/jterm.hs b/jterm.hs
index 681c283..0d60341 100644
--- a/jterm.hs
+++ b/jterm.hs
@@ -1,4 +1,4 @@
- {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE StrictData #-}
@@ -33,6 +33,7 @@ import qualified Streamly.Data.Stream.Prelude as S
import System.Environment
import System.IO.Unsafe
import System.Posix.Pty
+import Debug.Trace
doubleClickDelay = 300
@@ -342,8 +343,9 @@ handleEvent display win bgcolour fgcolour linecolour selcolour font event = do
put $ b {cursor = (min p q, max p q)}
_ -> do
case (mod, keysym) of
- (4, 117) ->
+ (4, 117) -> do
-- ctrl-u (delete content before cursor)
+ put $ b {pos = 0}
delins 0 start ""
(4, 105) ->
-- ctrl-i (delete content after cursor)