rcurses 6.1.3 → 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.
- checksums.yaml +4 -4
- data/lib/rcurses/pane.rb +15 -9
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f8dc65aadeb8d0dea863bb60bda36ed074a3f505c1127eb3350ea39baae51cc6
         | 
| 4 | 
            +
              data.tar.gz: aae046ee6d03631eb6c56a5bb77ddd5342334f1a843c592fb0d14f0185302be5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 06cff198d73cab23c5d063405186ba3613042abaa3e6f889eede18f8d1606480c715d38ff7f0df4082ee28e9f154b733283684e0bae1e66a433195db45c693ea
         | 
| 7 | 
            +
              data.tar.gz: '0796b77ec48324ece4f2218f14f84156bcde021736ab197dbc596da05996a7df866ca0d79d174a6d1e23ed3761ce8eaccb6c96113cd2388f3d43012e6d279b9a'
         | 
    
        data/lib/rcurses/pane.rb
    CHANGED
    
    | @@ -625,7 +625,14 @@ module Rcurses | |
| 625 625 | 
             
                    while chr != 'ESC'
         | 
| 626 626 | 
             
                      col(@x + prompt_len)
         | 
| 627 627 | 
             
                      cont = cont.slice(0, content_len)
         | 
| 628 | 
            -
                       | 
| 628 | 
            +
                      # Show indicator if multiline content detected
         | 
| 629 | 
            +
                      display_cont = cont
         | 
| 630 | 
            +
                      if @multiline_buffer && !@multiline_buffer.empty?
         | 
| 631 | 
            +
                        lines_indicator = " [+#{@multiline_buffer.size} lines]"
         | 
| 632 | 
            +
                        available = content_len - lines_indicator.length
         | 
| 633 | 
            +
                        display_cont = cont.slice(0, [available, 0].max) + lines_indicator if available > 0
         | 
| 634 | 
            +
                      end
         | 
| 635 | 
            +
                      print display_cont.ljust(content_len).c(fmt)
         | 
| 629 636 | 
             
                      # Calculate display width up to cursor position
         | 
| 630 637 | 
             
                      display_pos = @pos > 0 ? Rcurses.display_width(cont[0...@pos]) : 0
         | 
| 631 638 | 
             
                      col(@x + prompt_len + display_pos)
         | 
| @@ -655,9 +662,10 @@ module Rcurses | |
| 655 662 | 
             
                        cont = ''
         | 
| 656 663 | 
             
                        @pos = 0
         | 
| 657 664 | 
             
                      when 'ENTER'
         | 
| 658 | 
            -
                        # If there are lines in multiline_buffer,  | 
| 659 | 
            -
                        if @multiline_buffer && !@multiline_buffer.empty? | 
| 660 | 
            -
                           | 
| 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?
         | 
| 661 669 | 
             
                          @text = @multiline_buffer.shift # Return first line as @text
         | 
| 662 670 | 
             
                        else
         | 
| 663 671 | 
             
                          @text = cont
         | 
| @@ -689,15 +697,13 @@ module Rcurses | |
| 689 697 | 
             
                      while IO.select([$stdin], nil, nil, 0)
         | 
| 690 698 | 
             
                        chr = $stdin.read_nonblock(1) rescue nil
         | 
| 691 699 | 
             
                        break unless chr
         | 
| 692 | 
            -
                        # Handle newlines in multi-line paste
         | 
| 693 | 
            -
                        if chr == "\n"
         | 
| 694 | 
            -
                          @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?
         | 
| 695 703 | 
             
                          cont = ""
         | 
| 696 704 | 
             
                          @pos = 0
         | 
| 697 705 | 
             
                          next
         | 
| 698 706 | 
             
                        end
         | 
| 699 | 
            -
                        # Skip carriage returns
         | 
| 700 | 
            -
                        next if chr == "\r"
         | 
| 701 707 | 
             
                        if @pos < content_len
         | 
| 702 708 | 
             
                          cont.insert(@pos, chr)
         | 
| 703 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 | 
            +
              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- | 
| 11 | 
            +
            date: 2025-10-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: clipboard
         |