From 758f3331bb4e0397a12971f3bb9194240421b2e5 Mon Sep 17 00:00:00 2001 From: makspll Date: Fri, 1 Mar 2024 11:18:09 +0000 Subject: [PATCH] fix deprecation and CI not firing on PR's --- .github/workflows/build.yaml | 5 ++++- src/console.rs | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5a385b9..e387ad6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,10 @@ name: Check env: CARGO_TERM_COLOR: always on: - push + pull_request: + push: + branches: + - main jobs: check: runs-on: ubuntu-latest diff --git a/src/console.rs b/src/console.rs index fa8ff94..75fd2fa 100644 --- a/src/console.rs +++ b/src/console.rs @@ -491,7 +491,9 @@ fn console_key_pressed(keyboard_input: &KeyboardInput, configured_keys: &[KeyCod fn set_cursor_pos(ctx: &Context, id: Id, pos: usize) { if let Some(mut state) = TextEdit::load_state(ctx, id) { - state.set_ccursor_range(Some(CCursorRange::one(CCursor::new(pos)))); + state + .cursor + .set_char_range(Some(CCursorRange::one(CCursor::new(pos)))); state.store(ctx, id); } }