Add source caret and block indentation keyboard editing

This commit is contained in:
2026-09-22 11:50:45 -07:00
parent 136ed6e586
commit 3733a657bb
9 changed files with 435 additions and 6 deletions
+9
View File
@@ -1178,6 +1178,15 @@ pub(crate) fn source_binding(
use crate::source_navigation::{SymbolEvent, query::Action};
use iced::keyboard::{Key, key::Named};
use widget::text_editor::{Binding, Status};
if matches!(press.status, Status::Focused { .. })
&& press.key == Key::Named(Named::Tab)
&& (press.modifiers.is_empty() || press.modifiers == iced::keyboard::Modifiers::SHIFT)
{
return Some(Binding::Custom(Message::SourceIndent(
context.clone(),
press.modifiers.shift(),
)));
}
if matches!(press.status, Status::Focused { .. })
&& press.modifiers.is_empty()
&& press.key == Key::Named(Named::F2)