rcurses 6.1.4 → 6.1.5

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/lib/rcurses/pane.rb +7 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a78252386307963f8ee559bc6f127707a8ba2e58fd03d47c53bdec7ec0a0ea1c
4
- data.tar.gz: 195a79a814de7653f6f7940807ba72f4a41e1cabe6d86a48913e773940a95281
3
+ metadata.gz: f8dc65aadeb8d0dea863bb60bda36ed074a3f505c1127eb3350ea39baae51cc6
4
+ data.tar.gz: aae046ee6d03631eb6c56a5bb77ddd5342334f1a843c592fb0d14f0185302be5
5
5
  SHA512:
6
- metadata.gz: 0c122a74e7d389b060e2e6877617bf129413a586dd898e6c558c1799f953fde3315bed72ab6328e0842b9853a99c2ea0c2758a92e33c6d2cd4e899ac8593dd61
7
- data.tar.gz: c3490dc89c26e0269011a65bcc70bc79dd19caa3a303fc7ca566fc7ed5e6a62fe159ec9f16fba1dec561763a630e1fe12bd60fd22f67c40177397f75f23ee922
6
+ metadata.gz: 06cff198d73cab23c5d063405186ba3613042abaa3e6f889eede18f8d1606480c715d38ff7f0df4082ee28e9f154b733283684e0bae1e66a433195db45c693ea
7
+ data.tar.gz: '0796b77ec48324ece4f2218f14f84156bcde021736ab197dbc596da05996a7df866ca0d79d174a6d1e23ed3761ce8eaccb6c96113cd2388f3d43012e6d279b9a'
data/lib/rcurses/pane.rb CHANGED
@@ -662,9 +662,10 @@ module Rcurses
662
662
  cont = ''
663
663
  @pos = 0
664
664
  when 'ENTER'
665
- # If there are lines in multiline_buffer, add current line too
666
- if @multiline_buffer && !@multiline_buffer.empty? && !cont.empty?
667
- @multiline_buffer << cont.dup
665
+ # If there are lines in multiline_buffer, handle multiline paste
666
+ if @multiline_buffer && !@multiline_buffer.empty?
667
+ # Add current line if it's not empty
668
+ @multiline_buffer << cont.dup unless cont.empty?
668
669
  @text = @multiline_buffer.shift # Return first line as @text
669
670
  else
670
671
  @text = cont
@@ -696,15 +697,13 @@ module Rcurses
696
697
  while IO.select([$stdin], nil, nil, 0)
697
698
  chr = $stdin.read_nonblock(1) rescue nil
698
699
  break unless chr
699
- # Handle newlines in multi-line paste
700
- if chr == "\n"
701
- @multiline_buffer << cont.dup
700
+ # Handle newlines in multi-line paste (\n or \r)
701
+ if chr == "\n" || chr == "\r"
702
+ @multiline_buffer << cont.dup unless cont.empty?
702
703
  cont = ""
703
704
  @pos = 0
704
705
  next
705
706
  end
706
- # Skip carriage returns
707
- next if chr == "\r"
708
707
  if @pos < content_len
709
708
  cont.insert(@pos, chr)
710
709
  @pos += 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcurses
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.4
4
+ version: 6.1.5
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-10-10 00:00:00.000000000 Z
11
+ date: 2025-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard