aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-11 11:01:32 +0100
committerAkshay <[email protected]>2021-04-12 11:02:49 +0100
commitabcf2b32777ffb934788e3219cacc2bbc048b6a3 (patch)
treed310c7d2c69531a4583dac7ab34705f6ae5c12c7 /src/utils.rs
parentb0685c1638044b85dc7e8b07555a7b639b54d69a (diff)
add `selection-start` and `selection-end` primitives
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 0825c8c..d5d4039 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,7 +1,7 @@
1use crate::{ 1use crate::{
2 app::AppState, 2 app::AppState,
3 consts::FONT_PATH,
4 bitmap::{abs_difference, MapPoint}, 3 bitmap::{abs_difference, MapPoint},
4 consts::FONT_PATH,
5 lisp::{ 5 lisp::{
6 error::{EvalError, LispError, ParseError}, 6 error::{EvalError, LispError, ParseError},
7 eval::Evaluator, 7 eval::Evaluator,
@@ -143,7 +143,8 @@ pub fn rect_coords(s: MapPoint, e: MapPoint) -> (MapPoint, MapPoint) {
143 (e.x, s.y) 143 (e.x, s.y)
144 } else { 144 } else {
145 (e.x, e.y) 145 (e.x, e.y)
146 }.into(); 146 }
147 .into();
147 let end_loc = start_loc + (width, height).into(); 148 let end_loc = start_loc + (width, height).into();
148 (start_loc, end_loc) 149 (start_loc, end_loc)
149} 150}