AutoYADM commit: 2025-05-12 03:31:08

This commit is contained in:
Daniel Fichtinger 2025-05-12 03:31:08 -04:00
parent c6543d13f4
commit e03638a692
2 changed files with 13 additions and 25 deletions

View file

@ -1,7 +1,9 @@
#!/usr/bin/env python
# TODO: works great when going down, however there are problem
# with going UP if the line above is also wrapped
import sys
# import subprocess
session_id = sys.argv[1]
line_n = int(sys.argv[2])
@ -28,6 +30,10 @@ if 0 <= new_visual_row < len(chunks):
new_col = min(visual_col, len(target_chunk) - 1)
new_abs_col = new_visual_row * wrap_width + new_col
diff = abs(new_abs_col - col)
print(diff)
# _ = subprocess.run(args=["kak", "-c"])
key = "h" if direction == "up" else "l"
print(f"{diff}{key}")
else:
print(
"j" if direction == "down" else "k"
)