t-rex 2.3.1 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/t-rex +4 -14
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e8845f957cf1340f317155848cce0c35c39f45834fca8c849d3951c5aa916b0
|
4
|
+
data.tar.gz: eafc68e3eeaea4c904d070cfc79473c7ba175f7eca3d88a8e8b56f97e138c722
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a9b05138dc4cf184eee9b476c4e547bd0aec737885ff8449653ecc123bf43e65415ee21b206bc990b93210d3306ab3f0a4e2538becd2dea6cbd019833ceae1
|
7
|
+
data.tar.gz: 883e5319faf92ced38c738153772a4215611a3dbbee35a16de295ecd39884eb01b7510f43940f15a721e67b8171fdb0be611bbc96e6480f4a7a961546b74849f
|
data/bin/t-rex
CHANGED
@@ -12,19 +12,11 @@
|
|
12
12
|
# for any damages resulting from its use. Further, I am under no
|
13
13
|
# obligation to maintain or extend this software. It is provided
|
14
14
|
# on an 'as is' basis without any expressed or implied warranty.
|
15
|
-
@version = "2.3.
|
15
|
+
@version = "2.3.3" # Fixed cursor positioning
|
16
16
|
|
17
17
|
require 'rcurses'
|
18
18
|
include Rcurses::Input
|
19
19
|
|
20
|
-
class Rcurses::Pane
|
21
|
-
def clear
|
22
|
-
@text = ""
|
23
|
-
@ix = 0
|
24
|
-
full_refresh
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
20
|
def help # HELP text
|
29
21
|
help = <<HELPTEXT
|
30
22
|
|
@@ -630,7 +622,6 @@ def main_getkey(c) # GET KEY FROM USER
|
|
630
622
|
number, c = entry(chr)
|
631
623
|
if number != ""
|
632
624
|
@stk.l = @stk.x
|
633
|
-
@stk.lift unless @stk.x == 0
|
634
625
|
@stk.x = number
|
635
626
|
end
|
636
627
|
history(number.to_s)
|
@@ -644,11 +635,12 @@ end
|
|
644
635
|
def entry(chr) # X REGISTER ENTRY
|
645
636
|
num = chr
|
646
637
|
pos = 1
|
647
|
-
Rcurses::Cursor.set(7,33)
|
648
|
-
Rcurses::Cursor.show
|
649
638
|
while %w[0 1 2 3 4 5 6 7 8 9 . , h H e RIGHT LEFT HOME END DEL BACK WBACK LDEL].include?(chr)
|
650
639
|
@p_x.clear
|
651
640
|
@p_x.say(num)
|
641
|
+
# Position cursor at the right place in the X register (row 7, right-aligned in 30-char width)
|
642
|
+
cursor_col = 33 - num.length + pos
|
643
|
+
Rcurses::Cursor.set(7, cursor_col)
|
652
644
|
Rcurses::Cursor.show
|
653
645
|
chr = getchr
|
654
646
|
case chr
|
@@ -701,9 +693,7 @@ def entry(chr) # X REGISTER ENTRY
|
|
701
693
|
when /[0-9.,]/
|
702
694
|
num.insert(pos,chr)
|
703
695
|
pos += 1
|
704
|
-
@p_x.say(num)
|
705
696
|
end
|
706
|
-
Rcurses::Cursor.col(33 - num.length + pos)
|
707
697
|
end
|
708
698
|
num = "" if %w[DOWN UP].include?(chr)
|
709
699
|
num.gsub!(/,/, '.')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t-rex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
description: 'This is a terminal curses RPN calculator similar to the traditional
|
28
28
|
calculators from Hewlett Packard. See https://www.hpmuseum.org/rpn.htm for info
|
29
29
|
on RPN (Reverse Polish Notation). New in 2.3: Upgraded to new version of rcurses.
|
30
|
-
2.3.
|
30
|
+
2.3.3: Fixed cursor positioning.'
|
31
31
|
email: g@isene.com
|
32
32
|
executables:
|
33
33
|
- t-rex
|