summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2024-12-02 23:04:22 +1100
committerJustin Bedo <cu@cua0.org>2024-12-02 23:06:23 +1100
commit258848b4ec444a7e5486c66ee79818ea6899f554 (patch)
tree2f617e1dfcb0346bdd6d0728b2cc10631c591409
parent89dfb317ce8c443bfebec4866a4dbd1db34ecdb9 (diff)
fix redraw skipping bug and drop unused packages
-rw-r--r--jterm.hs3
-rw-r--r--package.yaml2
2 files changed, 1 insertions, 4 deletions
diff --git a/jterm.hs b/jterm.hs
index ac012af..ff997fa 100644
--- a/jterm.hs
+++ b/jterm.hs
@@ -412,11 +412,10 @@ handleEvent buffer display win bgcolour fgcolour linecolour selcolour font event
T toAppend -> do
let noesc = stripAnsiEscapeCodes toAppend
expandedTabs = T.intercalate "\n" $ map expandTabs $ T.splitOn "\n" noesc
- pl = pos b & linePos
cl = ptycursor b & linePos
linePos p = content b & R.splitAt p & fst & R.lengthAsPosition & posLine
delins' True (ptycursor b) (ptycursor b) $ R.fromText expandedTabs
- when (pl + pageheight > cl) redraw
+ when (pos b + pageheight > cl) redraw
Notify -> do
prop <- internAtom display "JTERM_CLIPBOARD" False
getWindowProperty8 display prop win >>= \case
diff --git a/package.yaml b/package.yaml
index e040603..70f2a4f 100644
--- a/package.yaml
+++ b/package.yaml
@@ -14,8 +14,6 @@ dependencies:
- text
- utf8-string
- bytestring
- - mtl
- - transformers
- strip-ansi-escape
- fusion-plugin
- containers