fatty 0.99.12.4 → 0.99.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92ce23525b67f32cb7bc2a2f822a5a67a5f9c8d3ad2d298c15ecfa6302a3a549
4
- data.tar.gz: d6f48bd5b8f22fbf3183703f79287dfa0267bb015f695933f7a0eea46b0a008e
3
+ metadata.gz: 159bce0cb2ef9b42917908e36fc355380da8316e3f356b9504db2cf364c6b40d
4
+ data.tar.gz: f585ad17eebb7045b05ec9c63e4e4725c31d14aff7cbb2aa09abce9e83d456fd
5
5
  SHA512:
6
- metadata.gz: e289f2cb952d4b836092eb636a5e5d18a1ae7587f2f7b0c1f409a821659ee4bca3200b8ab6b964e926cfcd48c5e707c83cf56f573c9b6cbb54c9d641aad38554
7
- data.tar.gz: da6b9a932adf9bcc0ef5db374bbc60bd29d335a4127a8367251c7f15e8e9238b213355d03648b5b613f8d93952c7004edc078eaf9fcbf7b8b8e2f92af9dd9399
6
+ metadata.gz: 8d3306302ad3fa2a46147138b93cf65ed06fa741d812fbaab0717d19894abc5bc5a6af4f79bf99f11bfc5abdcbd3e3fdd24bf0522c48ebb66c2c7976b0b5e393
7
+ data.tar.gz: 3f5d65e978254849204088d8d750bf08cf002347d848c6565c9b462f65742fa838a51362ebf95a3708071a0771beb89adbefc895fc1f4ab977e682a518913862
data/CHANGELOG.org CHANGED
@@ -6,6 +6,9 @@
6
6
  user would find useful.
7
7
  5. Give each heading a version number and an inactive date (C-c ! is useful here).
8
8
 
9
+ * Version 0.99.12.5 [2026-11-26 Thu]
10
+ - fix losing of cursor in popups during scrolling.
11
+
9
12
  * Version 0.99.12.4 [2026-11-26 Thu]
10
13
  - further tweaks to terminal background restore manifested in Windows terminal
11
14
 
@@ -49,8 +49,9 @@ module Fatty
49
49
 
50
50
  attr_reader :context, :key_decoder
51
51
 
52
- def initialize(context: Context.new, key_decoder: nil, poll_ms: 200)
52
+ def initialize(context: Context.new, key_decoder: nil, poll_ms: 200, window_provider: nil)
53
53
  @context = context
54
+ @window_provider = window_provider
54
55
  @key_decoder = key_decoder || KeyDecoder.new
55
56
  @poll_ms = poll_ms.to_i
56
57
  configure_input_polling!
@@ -111,7 +112,13 @@ module Fatty
111
112
  end
112
113
 
113
114
  def window
114
- context.input_win
115
+ modal_window = @window_provider&.call
116
+ if modal_window
117
+ modal_window.keypad(true)
118
+ modal_window
119
+ else
120
+ context.input_win
121
+ end
115
122
  end
116
123
 
117
124
  def configure_input_polling!
@@ -628,10 +628,24 @@ module Fatty
628
628
  @env ||= Fatty::Env.detect
629
629
  key_decoder = Fatty::Curses::KeyDecoder.new(env: @env)
630
630
  @event_source =
631
- Fatty::Curses::EventSource.new(context: @ctx, key_decoder: key_decoder, poll_ms: 50)
631
+ Fatty::Curses::EventSource.new(
632
+ context: @ctx,
633
+ key_decoder: key_decoder,
634
+ poll_ms: 50,
635
+ window_provider: -> { modal_input_window },
636
+ )
632
637
  self
633
638
  end
634
639
 
640
+ # PDCurses wgetch moves the physical cursor to the window being read.
641
+ # Read from the top modal so polling cannot repaint the shell over it.
642
+ # Truecolor paints with ANSI and must keep its existing curses input window.
643
+ def modal_input_window
644
+ return if @ctx.truecolor
645
+
646
+ @modal_stack.last&.fetch(:session)&.win
647
+ end
648
+
635
649
  # --- Shutdown ---------------------------------------------------------
636
650
 
637
651
  def cleanup_after_go
data/lib/fatty/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fatty
4
- VERSION = "0.99.12.4"
4
+ VERSION = "0.99.12.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fatty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.12.4
4
+ version: 0.99.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty