diff --git a/Cargo.lock b/Cargo.lock index 6e2c475..a21cd87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1241,7 +1241,7 @@ dependencies = [ [[package]] name = "toss" version = "0.1.0" -source = "git+https://github.com/Garmelon/toss.git?rev=53b2728c827c9f93a743d5860c1b31cb1399875b#53b2728c827c9f93a743d5860c1b31cb1399875b" +source = "git+https://github.com/Garmelon/toss.git?rev=c1907bb8ee215d534daf4188824293203b60dd9c#c1907bb8ee215d534daf4188824293203b60dd9c" dependencies = [ "crossterm", "unicode-linebreak", diff --git a/Cargo.toml b/Cargo.toml index 5abd4a4..92c0b7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,4 +30,7 @@ features = ["rustls-tls-native-roots"] [dependencies.toss] git = "https://github.com/Garmelon/toss.git" -rev = "53b2728c827c9f93a743d5860c1b31cb1399875b" +rev = "c1907bb8ee215d534daf4188824293203b60dd9c" + +# [patch."https://github.com/Garmelon/toss.git"] +# toss = { path = "../toss/" } diff --git a/src/ui/widgets/editor.rs b/src/ui/widgets/editor.rs index 2b71d2a..d2eb564 100644 --- a/src/ui/widgets/editor.rs +++ b/src/ui/widgets/editor.rs @@ -285,7 +285,7 @@ impl Widget for Editor { let (cursor_row, cursor_line_idx) = Self::wrapped_cursor(self.idx, &indices); let cursor_col = frame.width(lines[cursor_row].text().split_at(cursor_line_idx).0); - frame.set_cursor(Some(Pos::new(cursor_row as i32, cursor_col as i32))); + frame.set_cursor(Some(Pos::new(cursor_col as i32, cursor_row as i32))); for (i, line) in lines.into_iter().enumerate() { frame.write(Pos::new(0, i as i32), line);