Skip to content

Commit

Permalink
Merge pull request #513 from joncfoo/mac-editor-shortcuts
Browse files Browse the repository at this point in the history
fix(editor): common macos shortcuts for next and previous respected
  • Loading branch information
kaikalii authored Jun 12, 2024
2 parents 63fcb2b + f0128c3 commit 6e5986b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/src/editor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ pub fn Editor<'a>(
}
}
OutputItem::Svg(s) => view!(<div><img
class="output-image"
class="output-image"
src={format!("data:image/svg+xml;utf8, {}", urlencoding::encode(&s))}/>
</div>)
.into_view(),
Expand Down Expand Up @@ -688,7 +688,7 @@ pub fn Editor<'a>(
});
}
// Handle open delimiters
"(" | "[" | "{" => {
"(" | "[" | "{" if !event.meta_key() => {
// Surround the selected text with delimiters
let (open, close) = match key {
"\"" => ('"', '"'),
Expand All @@ -714,7 +714,7 @@ pub fn Editor<'a>(
});
}
// Handle close delimiters
")" | "]" | "}" => {
")" | "]" | "}" if !event.meta_key() => {
let (start, end) = get_code_cursor().unwrap();
let code = get_code();
let close = key.chars().next().unwrap();
Expand Down

0 comments on commit 6e5986b

Please sign in to comment.