pim

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7cfc353c2aa44951f283a708b0d68092d11b6765
parent 265e83bba6c3348dc59f4cedc7abbeaae9622999
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Sun, 12 Jul 2026 10:39:51 +0900

fix(editor): simplify conditional logic for cursor movement

Refactor KeyCode::Char('k') match arm to use a guard instead of a nested if statement for improved readability.

Diffstat:
Msrc/main.rs | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -290,12 +290,10 @@ fn run( } } } - KeyCode::Char('k') => { - if buffer.is_some() { - editor.move_cursor_up(); - if editor.cursor_line < editor.scroll_offset { - editor.scroll_up(); - } + KeyCode::Char('k') if buffer.is_some() => { + editor.move_cursor_up(); + if editor.cursor_line < editor.scroll_offset { + editor.scroll_up(); } } _ => {}