t-rex 2.3.2 → 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/t-rex +4 -6
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9aff5662f6344a4db356673645cf0933b4062a23c92268ae909dc2386d7de479
4
- data.tar.gz: 51586acf9c06c43dd085838582a4446c36b5a9285f59a573fc384c5ed737d305
3
+ metadata.gz: 4e8845f957cf1340f317155848cce0c35c39f45834fca8c849d3951c5aa916b0
4
+ data.tar.gz: eafc68e3eeaea4c904d070cfc79473c7ba175f7eca3d88a8e8b56f97e138c722
5
5
  SHA512:
6
- metadata.gz: 0a508633fe0ea2f418ba19b79610e09ebc796ecf15962a0d699349ffb31f560595219cfd1a12aad1fa8416b37c82908b858f0868bc603db3402ff1198292747a
7
- data.tar.gz: 1c1bef9a09d788fdbd81d23e3be1c7cc620ab614026829071376dffdf746a3be2b4e126c54335a9c1334a452b5b919ca7b21a0c3141a1f0d7ff3a52de4403a43
6
+ metadata.gz: a3a9b05138dc4cf184eee9b476c4e547bd0aec737885ff8449653ecc123bf43e65415ee21b206bc990b93210d3306ab3f0a4e2538becd2dea6cbd019833ceae1
7
+ data.tar.gz: 883e5319faf92ced38c738153772a4215611a3dbbee35a16de295ecd39884eb01b7510f43940f15a721e67b8171fdb0be611bbc96e6480f4a7a961546b74849f
data/bin/t-rex CHANGED
@@ -12,7 +12,7 @@
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.2" # Upgraded to new version of rcurses
15
+ @version = "2.3.3" # Fixed cursor positioning
16
16
 
17
17
  require 'rcurses'
18
18
  include Rcurses::Input
@@ -622,7 +622,6 @@ def main_getkey(c) # GET KEY FROM USER
622
622
  number, c = entry(chr)
623
623
  if number != ""
624
624
  @stk.l = @stk.x
625
- @stk.lift unless @stk.x == 0
626
625
  @stk.x = number
627
626
  end
628
627
  history(number.to_s)
@@ -636,11 +635,12 @@ end
636
635
  def entry(chr) # X REGISTER ENTRY
637
636
  num = chr
638
637
  pos = 1
639
- Rcurses::Cursor.set(7,33)
640
- Rcurses::Cursor.show
641
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)
642
639
  @p_x.clear
643
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)
644
644
  Rcurses::Cursor.show
645
645
  chr = getchr
646
646
  case chr
@@ -693,9 +693,7 @@ def entry(chr) # X REGISTER ENTRY
693
693
  when /[0-9.,]/
694
694
  num.insert(pos,chr)
695
695
  pos += 1
696
- @p_x.say(num)
697
696
  end
698
- Rcurses::Cursor.col(33 - num.length + pos)
699
697
  end
700
698
  num = "" if %w[DOWN UP].include?(chr)
701
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.2
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-04-14 00:00:00.000000000 Z
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.2: Fix for rcurses.'
30
+ 2.3.3: Fixed cursor positioning.'
31
31
  email: g@isene.com
32
32
  executables:
33
33
  - t-rex