about summary refs log tree commit diff stats
path: root/src/buffer/select.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-06 13:59:05 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-06 13:59:05 +0200
commitb5146e27f103523494fdec0272a084c18afe1a69 (patch)
treee0d7e5cc23dc232e29ee45f639deca3fdfdc15f0 /src/buffer/select.nim
parentf919cd6c39804f8f5c03a3b6125de8bf55fa4d38 (diff)
downloadchawan-b5146e27f103523494fdec0272a084c18afe1a69.tar.gz
select: simplify popCursorPos()
Diffstat (limited to 'src/buffer/select.nim')
-rw-r--r--src/buffer/select.nim4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/buffer/select.nim b/src/buffer/select.nim
index 1b1993c5..f7afa4d9 100644
--- a/src/buffer/select.nim
+++ b/src/buffer/select.nim
@@ -195,9 +195,7 @@ proc pushCursorPos*(select: var Select) =
   select.bpos.add(select.hover)
 
 proc popCursorPos*(select: var Select, nojump = false) =
-  let was = select.hover
-  let got = select.bpos.pop()
-  select.hover = got
+  select.hover = select.bpos.pop()
   if not nojump:
     select.redraw = true