rcurses 6.1.3 → 6.1.4

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 +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50072ee45a20e250fc0b370d62c25c99fc0a4d66bc014aa61819c5fbeaafde7d
4
- data.tar.gz: 382eb72b8698e332b3cf55b36729bb93c2935df5a50fe837684ded7912c4523f
3
+ metadata.gz: a78252386307963f8ee559bc6f127707a8ba2e58fd03d47c53bdec7ec0a0ea1c
4
+ data.tar.gz: 195a79a814de7653f6f7940807ba72f4a41e1cabe6d86a48913e773940a95281
5
5
  SHA512:
6
- metadata.gz: 6036a1f6668ff70d3ff7a6858fcaf68904c96744ebd325c1db147f01f05c6c7953535159a65908f1c7b0fb8c04c42fac104ca9bc97322ff9576065c164d155d0
7
- data.tar.gz: 3eb3944035a86b1894e8e9358b8ccd39a2e572019c23e07e8b5b845a007478b14ba2e12be2728417c4813a8dd95470651e907dad51e7679878d4789849c06cb4
6
+ metadata.gz: 0c122a74e7d389b060e2e6877617bf129413a586dd898e6c558c1799f953fde3315bed72ab6328e0842b9853a99c2ea0c2758a92e33c6d2cd4e899ac8593dd61
7
+ data.tar.gz: c3490dc89c26e0269011a65bcc70bc79dd19caa3a303fc7ca566fc7ed5e6a62fe159ec9f16fba1dec561763a630e1fe12bd60fd22f67c40177397f75f23ee922
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
- print cont.ljust(content_len).c(fmt)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcurses
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.3
4
+ version: 6.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene