hyperlist 1.2.5 → 1.2.7
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 +170 -37
- 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: cb7b134a799cd11a97a50f9163852f9c3afd2935826141b9cbb108bbcf5a3afd
|
4
|
+
data.tar.gz: f6a621767eeac7faf998a8ad29d843f343a2d2a07a8f7ed58d9184c52eab87b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4864cd12fb10a0d9051342af0895a43a813b7d4683623c865a1e013ed5617fe5350c219f28e053af8af249805ae21ce387fb4c2849b08142b5b454451301d81
|
7
|
+
data.tar.gz: 9eac427645abd7c2b571259d9e0daf97911508f05115d2417e45124e35101cd36540214ec66ac056d1ad459087b745c3c979f5b2a069642fc81348724e59e651
|
data/hyperlist
CHANGED
@@ -1283,38 +1283,116 @@ class HyperListApp
|
|
1283
1283
|
end
|
1284
1284
|
|
1285
1285
|
def move_up
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
@current
|
1286
|
+
if @presentation_mode
|
1287
|
+
# In presentation mode, we need to handle navigation differently
|
1288
|
+
visible_before = get_visible_items
|
1289
|
+
|
1290
|
+
if @current == 0
|
1291
|
+
# Wrap around to last item
|
1292
|
+
target_index = visible_before.length - 1
|
1293
|
+
else
|
1294
|
+
target_index = @current - 1
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
# Get the actual item we want to move to
|
1298
|
+
target_item = visible_before[target_index]
|
1299
|
+
target_real_idx = get_real_index(target_item)
|
1300
|
+
|
1301
|
+
# Update presentation focus for the target item
|
1302
|
+
@current = target_index
|
1303
|
+
update_presentation_focus
|
1304
|
+
|
1305
|
+
# Now find where the target item ended up after reorganization
|
1306
|
+
visible_after = get_visible_items
|
1307
|
+
visible_after.each_with_index do |item, idx|
|
1308
|
+
if get_real_index(item) == target_real_idx
|
1309
|
+
@current = idx
|
1310
|
+
break
|
1311
|
+
end
|
1312
|
+
end
|
1291
1313
|
else
|
1292
|
-
|
1314
|
+
# Normal mode navigation
|
1315
|
+
max_items = get_visible_items.length - 1
|
1316
|
+
|
1317
|
+
if @current == 0
|
1318
|
+
# Wrap around to last item
|
1319
|
+
@current = max_items
|
1320
|
+
else
|
1321
|
+
@current = [@current - 1, 0].max
|
1322
|
+
end
|
1293
1323
|
end
|
1294
|
-
|
1295
|
-
update_presentation_focus if @presentation_mode
|
1296
1324
|
end
|
1297
1325
|
|
1298
1326
|
def move_down
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1327
|
+
if @presentation_mode
|
1328
|
+
# In presentation mode, we need to handle navigation differently
|
1329
|
+
visible_before = get_visible_items
|
1330
|
+
max = visible_before.length - 1
|
1331
|
+
|
1332
|
+
if @current == max
|
1333
|
+
# Wrap around to first item
|
1334
|
+
target_index = 0
|
1335
|
+
else
|
1336
|
+
target_index = @current + 1
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
# Get the actual item we want to move to
|
1340
|
+
target_item = visible_before[target_index]
|
1341
|
+
target_real_idx = get_real_index(target_item)
|
1342
|
+
|
1343
|
+
# Update presentation focus for the target item
|
1344
|
+
@current = target_index
|
1345
|
+
update_presentation_focus
|
1346
|
+
|
1347
|
+
# Now find where the target item ended up after reorganization
|
1348
|
+
visible_after = get_visible_items
|
1349
|
+
visible_after.each_with_index do |item, idx|
|
1350
|
+
if get_real_index(item) == target_real_idx
|
1351
|
+
@current = idx
|
1352
|
+
break
|
1353
|
+
end
|
1354
|
+
end
|
1304
1355
|
else
|
1305
|
-
|
1356
|
+
# Normal mode navigation
|
1357
|
+
max = get_visible_items.length - 1
|
1358
|
+
|
1359
|
+
if @current == max
|
1360
|
+
# Wrap around to first item
|
1361
|
+
@current = 0
|
1362
|
+
else
|
1363
|
+
@current = [@current + 1, max].min
|
1364
|
+
end
|
1306
1365
|
end
|
1307
|
-
|
1308
|
-
update_presentation_focus if @presentation_mode
|
1309
1366
|
end
|
1310
1367
|
|
1311
1368
|
def page_up
|
1312
1369
|
if @split_view && @active_pane == :split
|
1313
1370
|
@split_current = [@split_current - (@split_pane.h - 1), 0].max
|
1371
|
+
elsif @presentation_mode
|
1372
|
+
# In presentation mode, handle page navigation differently
|
1373
|
+
visible_before = get_visible_items
|
1374
|
+
target_index = [@current - (@main.h - 1), 0].max
|
1375
|
+
|
1376
|
+
if target_index < visible_before.length
|
1377
|
+
target_item = visible_before[target_index]
|
1378
|
+
target_real_idx = get_real_index(target_item)
|
1379
|
+
|
1380
|
+
@current = target_index
|
1381
|
+
update_presentation_focus
|
1382
|
+
|
1383
|
+
# Find where the target item ended up
|
1384
|
+
visible_after = get_visible_items
|
1385
|
+
visible_after.each_with_index do |item, idx|
|
1386
|
+
if get_real_index(item) == target_real_idx
|
1387
|
+
@current = idx
|
1388
|
+
break
|
1389
|
+
end
|
1390
|
+
end
|
1391
|
+
end
|
1392
|
+
@offset = [@offset - (@main.h - 1), 0].max
|
1314
1393
|
else
|
1315
1394
|
@current = [@current - (@main.h - 1), 0].max
|
1316
1395
|
@offset = [@offset - (@main.h - 1), 0].max
|
1317
|
-
update_presentation_focus if @presentation_mode
|
1318
1396
|
end
|
1319
1397
|
end
|
1320
1398
|
|
@@ -1322,10 +1400,29 @@ class HyperListApp
|
|
1322
1400
|
if @split_view && @active_pane == :split
|
1323
1401
|
max = get_visible_split_items.length - 1
|
1324
1402
|
@split_current = [@split_current + (@split_pane.h - 1), max].min
|
1403
|
+
elsif @presentation_mode
|
1404
|
+
# In presentation mode, handle page navigation differently
|
1405
|
+
visible_before = get_visible_items
|
1406
|
+
max = visible_before.length - 1
|
1407
|
+
target_index = [@current + (@main.h - 1), max].min
|
1408
|
+
|
1409
|
+
target_item = visible_before[target_index]
|
1410
|
+
target_real_idx = get_real_index(target_item)
|
1411
|
+
|
1412
|
+
@current = target_index
|
1413
|
+
update_presentation_focus
|
1414
|
+
|
1415
|
+
# Find where the target item ended up
|
1416
|
+
visible_after = get_visible_items
|
1417
|
+
visible_after.each_with_index do |item, idx|
|
1418
|
+
if get_real_index(item) == target_real_idx
|
1419
|
+
@current = idx
|
1420
|
+
break
|
1421
|
+
end
|
1422
|
+
end
|
1325
1423
|
else
|
1326
1424
|
max = get_visible_items.length - 1
|
1327
1425
|
@current = [@current + (@main.h - 1), max].min
|
1328
|
-
update_presentation_focus if @presentation_mode
|
1329
1426
|
end
|
1330
1427
|
end
|
1331
1428
|
|
@@ -1336,12 +1433,39 @@ class HyperListApp
|
|
1336
1433
|
current_level = visible[@current]["level"]
|
1337
1434
|
return if current_level == 0
|
1338
1435
|
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1436
|
+
if @presentation_mode
|
1437
|
+
# Find parent and navigate to it properly
|
1438
|
+
target_idx = nil
|
1439
|
+
(@current - 1).downto(0) do |i|
|
1440
|
+
if visible[i]["level"] < current_level
|
1441
|
+
target_idx = i
|
1442
|
+
break
|
1443
|
+
end
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
if target_idx
|
1447
|
+
target_item = visible[target_idx]
|
1448
|
+
target_real_idx = get_real_index(target_item)
|
1449
|
+
|
1450
|
+
@current = target_idx
|
1451
|
+
update_presentation_focus
|
1452
|
+
|
1453
|
+
# Find where the target item ended up
|
1454
|
+
visible_after = get_visible_items
|
1455
|
+
visible_after.each_with_index do |item, idx|
|
1456
|
+
if get_real_index(item) == target_real_idx
|
1457
|
+
@current = idx
|
1458
|
+
break
|
1459
|
+
end
|
1460
|
+
end
|
1461
|
+
end
|
1462
|
+
else
|
1463
|
+
# Search upward for parent
|
1464
|
+
(@current - 1).downto(0) do |i|
|
1465
|
+
if visible[i]["level"] < current_level
|
1466
|
+
@current = i
|
1467
|
+
break
|
1468
|
+
end
|
1345
1469
|
end
|
1346
1470
|
end
|
1347
1471
|
end
|
@@ -1352,8 +1476,24 @@ class HyperListApp
|
|
1352
1476
|
|
1353
1477
|
current_level = visible[@current]["level"]
|
1354
1478
|
if visible[@current + 1]["level"] > current_level
|
1355
|
-
@
|
1356
|
-
|
1479
|
+
if @presentation_mode
|
1480
|
+
target_item = visible[@current + 1]
|
1481
|
+
target_real_idx = get_real_index(target_item)
|
1482
|
+
|
1483
|
+
@current += 1
|
1484
|
+
update_presentation_focus
|
1485
|
+
|
1486
|
+
# Find where the target item ended up
|
1487
|
+
visible_after = get_visible_items
|
1488
|
+
visible_after.each_with_index do |item, idx|
|
1489
|
+
if get_real_index(item) == target_real_idx
|
1490
|
+
@current = idx
|
1491
|
+
break
|
1492
|
+
end
|
1493
|
+
end
|
1494
|
+
else
|
1495
|
+
@current += 1
|
1496
|
+
end
|
1357
1497
|
end
|
1358
1498
|
end
|
1359
1499
|
|
@@ -1850,16 +1990,9 @@ class HyperListApp
|
|
1850
1990
|
end
|
1851
1991
|
end
|
1852
1992
|
else
|
1853
|
-
# For single line delete
|
1993
|
+
# For single line delete (D key - delete only the current line)
|
1854
1994
|
@clipboard_is_tree = false # Mark as single/adaptive for paste behavior
|
1855
|
-
|
1856
|
-
if @items[i]["level"] > level
|
1857
|
-
@clipboard << @items[i].dup
|
1858
|
-
delete_count += 1
|
1859
|
-
else
|
1860
|
-
break
|
1861
|
-
end
|
1862
|
-
end
|
1995
|
+
# Don't include children - delete_count stays at 1
|
1863
1996
|
end
|
1864
1997
|
|
1865
1998
|
# Delete the items
|
@@ -5008,8 +5141,8 @@ class HyperListApp
|
|
5008
5141
|
cycle_indent_size
|
5009
5142
|
when "t"
|
5010
5143
|
show_templates
|
5011
|
-
when "D" # Delete line (
|
5012
|
-
delete_line(false) #
|
5144
|
+
when "D" # Delete line only (without children)
|
5145
|
+
delete_line(false) # Delete current line only
|
5013
5146
|
when "C-D" # Delete line and all descendants explicitly
|
5014
5147
|
delete_line(true)
|
5015
5148
|
when "C-E" # Toggle line encryption
|
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.7
|
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-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|