hyperlist 1.5.1 → 1.5.2
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/CHANGELOG.md +9 -0
- data/hyperlist +40 -10
- data/hyperlist.gemspec +1 -1
- 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: ec123fe286a3c475f76868ed8d0cdd1a512f7323c6da8d9446d2ea7e3913ce61
|
4
|
+
data.tar.gz: 637a405887c8725cd229ba0dbd8bfa0d0f75cffa787f336a59477a32a70b1669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1ec3ebc57c928ab5c583da3ab2663cbaf73da09e36818f14e0973f3392583ebb5dc4ad1ee543f8263b386709677b70b73227b71c8145738f5afeee14e7a6af4
|
7
|
+
data.tar.gz: 8d2ff0119d45decfba5fbef08d96d19ebf92f63d0ce33fe35350a3a53cd92fbb94cc845fe85a951d746c374b87b2932c50f5bd54623b953edab162e8eee901c8
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
All notable changes to the HyperList Ruby TUI will be documented in this file.
|
4
4
|
|
5
|
+
## [1.5.2] - 2025-09-18
|
6
|
+
|
7
|
+
### Enhanced
|
8
|
+
- **Smart movement behavior for collapsed items**
|
9
|
+
- LEFT/RIGHT arrow keys now move collapsed trees as a unit when item is folded
|
10
|
+
- Uncollapsed items move individually (only the current item)
|
11
|
+
- Maintains "move what's visible" principle for intuitive navigation
|
12
|
+
- Works in both normal and split-view modes
|
13
|
+
|
5
14
|
## [1.4.5] - 2025-09-02
|
6
15
|
|
7
16
|
### Added
|
data/hyperlist
CHANGED
@@ -1610,6 +1610,30 @@ class HyperListApp
|
|
1610
1610
|
false
|
1611
1611
|
end
|
1612
1612
|
|
1613
|
+
def should_move_with_children?
|
1614
|
+
if @split_view && @active_pane == :split
|
1615
|
+
# Handle split pane
|
1616
|
+
visible_items = get_visible_split_items
|
1617
|
+
return false if @split_current >= visible_items.length
|
1618
|
+
|
1619
|
+
item = visible_items[@split_current]
|
1620
|
+
real_idx = @split_items.index(item)
|
1621
|
+
|
1622
|
+
# Move with children only if item is folded (collapsed) and has children
|
1623
|
+
return real_idx && has_children_in_array?(real_idx, @split_items) && item["fold"]
|
1624
|
+
else
|
1625
|
+
# Handle main pane
|
1626
|
+
visible = get_visible_items
|
1627
|
+
return false if @current >= visible.length
|
1628
|
+
|
1629
|
+
item = visible[@current]
|
1630
|
+
real_idx = get_real_index(item)
|
1631
|
+
|
1632
|
+
# Move with children only if item is folded (collapsed) and has children
|
1633
|
+
return real_idx && has_children?(real_idx, @items) && @items[real_idx]["fold"]
|
1634
|
+
end
|
1635
|
+
end
|
1636
|
+
|
1613
1637
|
def get_last_descendant_index(idx, items)
|
1614
1638
|
# Find the index after the last descendant of item at idx
|
1615
1639
|
# Returns idx + 1 if no children
|
@@ -4883,16 +4907,20 @@ class HyperListApp
|
|
4883
4907
|
indent_left(true) # with children
|
4884
4908
|
end
|
4885
4909
|
when "RIGHT"
|
4910
|
+
# Move collapsed trees as a unit, but only the item if uncollapsed
|
4911
|
+
should_move_children = should_move_with_children?
|
4886
4912
|
if @split_view && @active_pane == :split
|
4887
|
-
indent_split_right(
|
4913
|
+
indent_split_right(should_move_children)
|
4888
4914
|
else
|
4889
|
-
indent_right(
|
4915
|
+
indent_right(should_move_children)
|
4890
4916
|
end
|
4891
4917
|
when "LEFT"
|
4918
|
+
# Move collapsed trees as a unit, but only the item if uncollapsed
|
4919
|
+
should_move_children = should_move_with_children?
|
4892
4920
|
if @split_view && @active_pane == :split
|
4893
|
-
indent_split_left(
|
4921
|
+
indent_split_left(should_move_children)
|
4894
4922
|
else
|
4895
|
-
indent_left(
|
4923
|
+
indent_left(should_move_children)
|
4896
4924
|
end
|
4897
4925
|
when " "
|
4898
4926
|
toggle_fold
|
@@ -5681,18 +5709,20 @@ class HyperListApp
|
|
5681
5709
|
when "l"
|
5682
5710
|
go_to_first_child
|
5683
5711
|
when "LEFT"
|
5684
|
-
#
|
5712
|
+
# Move collapsed trees as a unit, but only the item if uncollapsed
|
5713
|
+
should_move_children = should_move_with_children?
|
5685
5714
|
if @split_view && @active_pane == :split
|
5686
|
-
indent_split_left(
|
5715
|
+
indent_split_left(should_move_children)
|
5687
5716
|
else
|
5688
|
-
indent_left(
|
5717
|
+
indent_left(should_move_children)
|
5689
5718
|
end
|
5690
5719
|
when "RIGHT"
|
5691
|
-
#
|
5720
|
+
# Move collapsed trees as a unit, but only the item if uncollapsed
|
5721
|
+
should_move_children = should_move_with_children?
|
5692
5722
|
if @split_view && @active_pane == :split
|
5693
|
-
indent_split_right(
|
5723
|
+
indent_split_right(should_move_children)
|
5694
5724
|
else
|
5695
|
-
indent_right(
|
5725
|
+
indent_right(should_move_children)
|
5696
5726
|
end
|
5697
5727
|
when "PgUP" # Page Up
|
5698
5728
|
page_up
|
data/hyperlist.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyperlist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: "."
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|