hyperlist 1.2.4 → 1.2.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/hyperlist +81 -26
- 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: 1bfa281e52d034a301cc645167ff71600f11bbb718b6220ff97ba1df74feed97
|
4
|
+
data.tar.gz: 67ef0888bfad609aea9260b07c538cba47ac219e70aec504f568b7fbea00d6cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f932ad62217a97698953ff73930ce28a54d7abe67510eeadbfb1e84ea2a64421a66d3239e2badde5bd7fd19e920d3c916b378a792e1f87c97549298867c0d17
|
7
|
+
data.tar.gz: 8fe1a8f377ec7775e024030e3119121727935225da24517dd77e72079ca17969cef632ff320259fdb80a6c93d4b044c51493571a42f2b0bd7ff45c6a7cb7c3c4
|
data/hyperlist
CHANGED
@@ -783,13 +783,16 @@ class HyperListApp
|
|
783
783
|
end
|
784
784
|
end
|
785
785
|
|
786
|
-
# Apply current item highlighting
|
786
|
+
# Apply current item highlighting (but not in presentation mode for focused items)
|
787
787
|
if idx == @current
|
788
|
-
|
789
|
-
if
|
790
|
-
|
791
|
-
|
792
|
-
|
788
|
+
# Skip background highlighting in presentation mode for items in focus
|
789
|
+
if !(@presentation_mode && is_item_in_presentation_focus?(item))
|
790
|
+
bg_color = (!@split_view || @active_pane == :main) ? "237" : "234"
|
791
|
+
if bg_color
|
792
|
+
bg_code = "\e[48;5;#{bg_color}m"
|
793
|
+
reset_bg = "\e[49m"
|
794
|
+
line = bg_code + line.gsub(/\e\[49m/, '') + reset_bg
|
795
|
+
end
|
793
796
|
end
|
794
797
|
end
|
795
798
|
|
@@ -1354,6 +1357,44 @@ class HyperListApp
|
|
1354
1357
|
end
|
1355
1358
|
end
|
1356
1359
|
|
1360
|
+
def jump_to_next_sibling
|
1361
|
+
visible = get_visible_items
|
1362
|
+
return if @current >= visible.length - 1
|
1363
|
+
|
1364
|
+
current_level = visible[@current]["level"]
|
1365
|
+
|
1366
|
+
# Search forward for the next item at the same level
|
1367
|
+
(@current + 1...visible.length).each do |i|
|
1368
|
+
if visible[i]["level"] == current_level
|
1369
|
+
@current = i
|
1370
|
+
update_presentation_focus if @presentation_mode
|
1371
|
+
return
|
1372
|
+
elsif visible[i]["level"] < current_level
|
1373
|
+
# We've gone up a level, no more siblings
|
1374
|
+
return
|
1375
|
+
end
|
1376
|
+
end
|
1377
|
+
end
|
1378
|
+
|
1379
|
+
def jump_to_prev_sibling
|
1380
|
+
visible = get_visible_items
|
1381
|
+
return if @current <= 0
|
1382
|
+
|
1383
|
+
current_level = visible[@current]["level"]
|
1384
|
+
|
1385
|
+
# Search backward for the previous item at the same level
|
1386
|
+
(@current - 1).downto(0) do |i|
|
1387
|
+
if visible[i]["level"] == current_level
|
1388
|
+
@current = i
|
1389
|
+
update_presentation_focus if @presentation_mode
|
1390
|
+
return
|
1391
|
+
elsif visible[i]["level"] < current_level
|
1392
|
+
# We've gone up a level, no more siblings before this
|
1393
|
+
return
|
1394
|
+
end
|
1395
|
+
end
|
1396
|
+
end
|
1397
|
+
|
1357
1398
|
def expand_to_level(level)
|
1358
1399
|
@items.each do |item|
|
1359
1400
|
item["fold"] = item["level"] >= level
|
@@ -1444,9 +1485,11 @@ class HyperListApp
|
|
1444
1485
|
item["presentation_focus"] = false
|
1445
1486
|
end
|
1446
1487
|
|
1447
|
-
# Mark current item as in focus and unfold it
|
1448
|
-
|
1449
|
-
|
1488
|
+
# Mark current item as in focus and unfold it in the main items array
|
1489
|
+
if current_real_idx && current_real_idx < @items.length
|
1490
|
+
@items[current_real_idx]["presentation_focus"] = true
|
1491
|
+
@items[current_real_idx]["fold"] = false
|
1492
|
+
end
|
1450
1493
|
|
1451
1494
|
# Unfold all ancestors of current item
|
1452
1495
|
ancestor_indices = []
|
@@ -2314,11 +2357,13 @@ class HyperListApp
|
|
2314
2357
|
help_lines << help_line("#{"h".fg("10")}", "Go to parent", "#{"l".fg("10")}", "Go to first child")
|
2315
2358
|
help_lines << help_line("#{"PgUp".fg("10")}", "Page up", "#{"PgDn".fg("10")}", "Page down")
|
2316
2359
|
help_lines << help_line("#{"g/Home".fg("10")}", "Go to top", "#{"G/End".fg("10")}", "Go to bottom")
|
2317
|
-
help_lines << help_line("#{"
|
2318
|
-
help_lines << help_line("#{"?".fg("10")}", "This help", "#{"??".fg("10")}", "Full documentation")
|
2360
|
+
help_lines << help_line("#{"R".fg("10")}", "Jump to reference", "#{"F".fg("10")}", "Open file/URL")
|
2319
2361
|
help_lines << help_line("#{"ma".fg("10")}", "Set mark 'a'", "#{"'a".fg("10")}", "Jump to mark 'a'")
|
2320
2362
|
help_lines << help_line("#{"''".fg("10")}", "Jump to prev position", "#{"N".fg("10")}", "Next = template marker")
|
2321
2363
|
help_lines << ""
|
2364
|
+
help_lines << "#{"SEARCH".fg("14")}"
|
2365
|
+
help_lines << help_line("#{"/".fg("10")}", "Search forward", "#{"n".fg("10")}", "Next match")
|
2366
|
+
help_lines << ""
|
2322
2367
|
help_lines << "#{"FOLDING".fg("14")}"
|
2323
2368
|
help_lines << help_line("#{"Space".fg("10")}", "Toggle fold", "#{"za".fg("10")}", "Toggle all folds")
|
2324
2369
|
help_lines << help_line("#{"zo".fg("10")}", "Open fold", "#{"zc".fg("10")}", "Close fold")
|
@@ -2341,14 +2386,12 @@ class HyperListApp
|
|
2341
2386
|
help_lines << help_line("#{"Tab".fg("10")}", "Indent item+kids", "#{"S-Tab".fg("10")}", "Unindent item+kids")
|
2342
2387
|
help_lines << help_line("#{"→".fg("10")}", "Indent item only", "#{"←".fg("10")}", "Unindent item only")
|
2343
2388
|
help_lines << ""
|
2344
|
-
help_lines << "#{"FEATURES".fg("14")}"
|
2389
|
+
help_lines << "#{"SPECIAL FEATURES".fg("14")}"
|
2345
2390
|
help_lines << help_line("#{"v".fg("10")}", "Toggle checkbox", "#{"V".fg("10")}", "Checkbox with date")
|
2346
2391
|
help_lines << help_line("#{"C-E".fg("10")}", "Encrypt/decrypt line", "#{"C-U".fg("10")}", "Toggle State/Trans underline")
|
2347
|
-
help_lines << help_line("#{"
|
2348
|
-
help_lines << help_line("#{"N".fg("10")}", "Next = marker", "#{"P".fg("10")}", "Presentation mode")
|
2349
|
-
help_lines << help_line("#{"t".fg("10")}", "Insert template", "#{":st".fg("10")}", "Save as template")
|
2392
|
+
help_lines << help_line("#{"P".fg("10")}", "Presentation mode", "#{"Tab/S-Tab".fg("10")}", "Next/prev sibling (in P)")
|
2350
2393
|
help_lines << help_line("#{"Ma".fg("10")}", "Record macro 'a'", "#{"@a".fg("10")}", "Play macro 'a'")
|
2351
|
-
help_lines << help_line("#{"
|
2394
|
+
help_lines << help_line("#{"w".fg("10")}", "Switch panes (split view)", "", "")
|
2352
2395
|
help_lines << ""
|
2353
2396
|
help_lines << "#{"FILE OPERATIONS".fg("14")}"
|
2354
2397
|
help_lines << help_line("#{":w".fg("10")}", "Save", "#{":q".fg("10")}", "Quit")
|
@@ -2359,9 +2402,11 @@ class HyperListApp
|
|
2359
2402
|
help_lines << help_line("#{":as N".fg("10")}", "Set interval (secs)", "#{":as".fg("10")}", "Show autosave status")
|
2360
2403
|
help_lines << ""
|
2361
2404
|
help_lines << "#{"TEMPLATES".fg("14")}"
|
2362
|
-
help_lines << help_line("#{"
|
2363
|
-
help_lines << help_line("#{":
|
2405
|
+
help_lines << help_line("#{"t".fg("10")}", "Insert template", "#{":st".fg("10")}", "Save as template")
|
2406
|
+
help_lines << help_line("#{":dt".fg("10")}", "Delete template", "#{":lt".fg("10")}", "List user templates")
|
2364
2407
|
help_lines << ""
|
2408
|
+
help_lines << "#{"HELP & QUIT".fg("14")}"
|
2409
|
+
help_lines << help_line("#{"?".fg("10")}", "This help", "#{"??".fg("10")}", "Full documentation")
|
2365
2410
|
help_lines << help_line("#{"q".fg("10")}", "Quit (asks to save)", "#{"Q".fg("10")}", "Force quit")
|
2366
2411
|
help_lines << ""
|
2367
2412
|
help_lines << "#{"COLOR SCHEME".fg("14")}"
|
@@ -4986,18 +5031,28 @@ class HyperListApp
|
|
4986
5031
|
when "C-K" # Alternative: Move item and descendants up (for terminals that intercept C-UP)
|
4987
5032
|
move_item_up(true)
|
4988
5033
|
when "TAB"
|
4989
|
-
|
4990
|
-
|
4991
|
-
|
5034
|
+
if @presentation_mode
|
5035
|
+
# In presentation mode, Tab goes to next sibling
|
5036
|
+
jump_to_next_sibling
|
4992
5037
|
else
|
4993
|
-
|
5038
|
+
# Normal mode: Indent with all children
|
5039
|
+
if @split_view && @active_pane == :split
|
5040
|
+
indent_split_right(true)
|
5041
|
+
else
|
5042
|
+
indent_right(true)
|
5043
|
+
end
|
4994
5044
|
end
|
4995
5045
|
when "S-TAB" # Shift-Tab
|
4996
|
-
|
4997
|
-
|
4998
|
-
|
5046
|
+
if @presentation_mode
|
5047
|
+
# In presentation mode, Shift-Tab goes to previous sibling
|
5048
|
+
jump_to_prev_sibling
|
4999
5049
|
else
|
5000
|
-
|
5050
|
+
# Normal mode: Unindent with all children
|
5051
|
+
if @split_view && @active_pane == :split
|
5052
|
+
indent_split_left(true)
|
5053
|
+
else
|
5054
|
+
indent_left(true)
|
5055
|
+
end
|
5001
5056
|
end
|
5002
5057
|
when "u"
|
5003
5058
|
undo
|
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.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: "."
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|