line wrapping is now working properly well
This commit is contained in:
@@ -243,6 +243,17 @@ fn handle_key_press(
|
||||
(KeyCode::Delete, _) => editor.delete_char_forward(),
|
||||
(KeyCode::Backspace, _) => editor.delete_char_backward(),
|
||||
|
||||
(KeyCode::F(1), _) => {
|
||||
// Switch to indicator mode
|
||||
editor.textarea.use_overflow_indicator('$');
|
||||
editor.set_debug_message("Overflow: indicator '$' (wrap OFF)".to_string());
|
||||
}
|
||||
(KeyCode::F(2), _) => {
|
||||
// Switch to wrap mode
|
||||
editor.textarea.use_wrap();
|
||||
editor.set_debug_message("Overflow: wrap ON".to_string());
|
||||
}
|
||||
|
||||
// Debug/info
|
||||
(KeyCode::Char('?'), _) => {
|
||||
editor.set_debug_message(format!(
|
||||
|
||||
@@ -77,6 +77,7 @@ Press ? for help, F1/F2 for manual cursor control demo.";
|
||||
|
||||
let mut textarea = TextAreaState::from_text(initial_text);
|
||||
textarea.set_placeholder("Start typing...");
|
||||
textarea.use_wrap();
|
||||
|
||||
Self {
|
||||
textarea,
|
||||
|
||||
Reference in New Issue
Block a user