mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
rustfmt
This commit is contained in:
parent
fb66312a69
commit
657081fc3c
2 changed files with 5 additions and 16 deletions
|
@ -1,7 +1,5 @@
|
||||||
use crate::tea::model::Model;
|
use crate::tea::model::Model;
|
||||||
use crate::tea::update::{
|
use crate::tea::update::{move_caret_down, move_caret_left, move_caret_right, move_caret_up};
|
||||||
move_caret_down, move_caret_left, move_caret_right, move_caret_up,
|
|
||||||
};
|
|
||||||
use winit::event::{ElementState, ModifiersState, VirtualKeyCode};
|
use winit::event::{ElementState, ModifiersState, VirtualKeyCode};
|
||||||
|
|
||||||
pub fn handle_keydown(
|
pub fn handle_keydown(
|
||||||
|
|
|
@ -211,12 +211,8 @@ fn run_event_loop() -> Result<(), Box<dyn Error>> {
|
||||||
.expect("Failed to acquire next SwapChainFrame")
|
.expect("Failed to acquire next SwapChainFrame")
|
||||||
.output;
|
.output;
|
||||||
|
|
||||||
let glyph_bounds_rects = queue_all_text(
|
let glyph_bounds_rects =
|
||||||
&size,
|
queue_all_text(&size, &ed_model.lines, ed_model.caret_pos, &mut glyph_brush);
|
||||||
&ed_model.lines,
|
|
||||||
ed_model.caret_pos,
|
|
||||||
&mut glyph_brush,
|
|
||||||
);
|
|
||||||
|
|
||||||
if let Some(selection) = ed_model.selection_opt {
|
if let Some(selection) = ed_model.selection_opt {
|
||||||
let selection_rects_res =
|
let selection_rects_res =
|
||||||
|
@ -423,13 +419,8 @@ fn update_text_state(ed_model: &mut model::Model, received_char: &char) {
|
||||||
} else if ed_model.lines.len() > 1 {
|
} else if ed_model.lines.len() > 1 {
|
||||||
ed_model.lines.pop();
|
ed_model.lines.pop();
|
||||||
}
|
}
|
||||||
ed_model.caret_pos = update::move_caret_left(
|
ed_model.caret_pos =
|
||||||
ed_model.caret_pos,
|
update::move_caret_left(ed_model.caret_pos, None, false, &ed_model.lines).0;
|
||||||
None,
|
|
||||||
false,
|
|
||||||
&ed_model.lines,
|
|
||||||
)
|
|
||||||
.0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'\u{e000}'..='\u{f8ff}' | '\u{f0000}'..='\u{ffffd}' | '\u{100000}'..='\u{10fffd}' => {
|
'\u{e000}'..='\u{f8ff}' | '\u{f0000}'..='\u{ffffd}' | '\u{100000}'..='\u{10fffd}' => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue