zaniah 0.12.0 → 0.12.1

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: 8bda306c4301dbab842c0014a31bd563366fd846755c1adab9b864704dcd04a2
4
- data.tar.gz: 94a9f0005a5e03e97f64f362e9ace3c1ec1757a2f73b9bf893f4e4eee6c56926
3
+ metadata.gz: 2880a0bf76786c774939df0c5d8c02cc287789607221c6a1739d71b50fcc2248
4
+ data.tar.gz: f2ccf99f464295d8e7af77e61a0b38911f133728b979f868b4ede8ce2f4a5fdd
5
5
  SHA512:
6
- metadata.gz: 0ed9ec96438a5e8de2c420b13d709be7865ad5a1df0d5e0d41cb23a110a2fe00dfc9143624a4fa4ead856e02f9b63c9e986df2f89ecee7e1f113e6265bfa6485
7
- data.tar.gz: 118e347c3b1fe1ddc83e5f5a3390fd4dfb026ca95b79d32239c328960b1dc3a91525e7e70f1b60ef24570026f4f997dd0bb82f955a12c3f67653bd8db90d4032
6
+ metadata.gz: e1a950ab9299a1a0121469d98310c945b7dbefb611b87f286c28d769fbbcdb3d14fb3cc20d12c135b5620071cbcc1ac75dc3ac083bc4c6c4978558d1fd75fb36
7
+ data.tar.gz: d31dd8cd5722a4bccccdc73f54e0cff07770d1094fe67a5d3ef000f097b950228f8b6a9f9ac05b0adc380d61a393c82ef24b66ff3810ffda3b8fdd8e3a904c8c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.1 — 2026-10-02
4
+
5
+ - Prevent obsolete focus controls from accumulating across redraws, reducing memory use and keeping keyboard navigation on current controls.
6
+
3
7
  ## 0.12.0 — 2026-10-02
4
8
 
5
9
  - Add streaming virtual tables with lazy cells, stable selection, row styling, configurable columns, and tail following.
@@ -20,6 +20,7 @@ module Zaniah
20
20
  @keymap, @hits = keymap, []
21
21
  @transforms = [Transform.identity]
22
22
  @focus_tree = FocusTree.new
23
+ @automatic_focus_parents = []
23
24
  end
24
25
 
25
26
  def focus(handle, origin: :programmatic)
@@ -100,6 +101,7 @@ module Zaniah
100
101
  if owner.respond_to?(:focus_handle) && (parent = owner.focus_handle)
101
102
  unless parent.equal?(handle)
102
103
  handle.parent = parent
104
+ @automatic_focus_parents << [handle, parent]
103
105
  break
104
106
  end
105
107
  end
@@ -116,6 +118,10 @@ module Zaniah
116
118
 
117
119
  def clear_hits
118
120
  @hits.clear
121
+ @automatic_focus_parents.each do |handle, parent|
122
+ handle.parent = nil if handle.parent.equal?(parent)
123
+ end
124
+ @automatic_focus_parents.clear
119
125
  @focus_tree.clear
120
126
  @transforms.replace([Transform.identity])
121
127
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zaniah
4
- VERSION = "0.12.0"
4
+ VERSION = "0.12.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaniah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada