forked from genewildish/Mainline
Fix scroll direction inversion in REPL
Fixed the scroll direction bug where PageUp/PageDown were inverted: - page_up now scrolls UP (back in time) with positive delta (+10) - page_down now scrolls DOWN (forward in time) with negative delta (-10) - Mouse wheel up/down also fixed with same logic (+3/-3) The scroll logic in scroll_output() was correct (positive = scroll up), but the key handlers in both main.py and pipeline_runner.py had the signs inverted.
This commit is contained in:
@@ -576,9 +576,13 @@ def run_pipeline_mode_direct():
|
||||
elif key == "down":
|
||||
repl_effect.navigate_history(1)
|
||||
elif key == "page_up":
|
||||
repl_effect.scroll_output(-10) # Scroll up 10 lines
|
||||
repl_effect.scroll_output(
|
||||
10
|
||||
) # Positive = scroll UP (back in time)
|
||||
elif key == "page_down":
|
||||
repl_effect.scroll_output(10) # Scroll down 10 lines
|
||||
repl_effect.scroll_output(
|
||||
-10
|
||||
) # Negative = scroll DOWN (forward in time)
|
||||
elif key == "backspace":
|
||||
repl_effect.backspace()
|
||||
elif key.startswith("mouse:"):
|
||||
@@ -587,9 +591,9 @@ def run_pipeline_mode_direct():
|
||||
if len(parts) >= 2:
|
||||
button = int(parts[1])
|
||||
if button == 64: # Wheel up
|
||||
repl_effect.scroll_output(-3) # Scroll up 3 lines
|
||||
repl_effect.scroll_output(3) # Positive = scroll UP
|
||||
elif button == 65: # Wheel down
|
||||
repl_effect.scroll_output(3) # Scroll down 3 lines
|
||||
repl_effect.scroll_output(-3) # Negative = scroll DOWN
|
||||
elif len(key) == 1:
|
||||
repl_effect.append_to_command(key)
|
||||
# --- End REPL Input Handling ---
|
||||
|
||||
Reference in New Issue
Block a user