From c4530794fbae7f7ef5b30a0c7c781e164cb808f7 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Sat, 7 Jun 2014 14:36:04 -0700 Subject: [PATCH] cursor should move on shift-home and shift-end --- stb_textedit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stb_textedit.h b/stb_textedit.h index bfe7967..47c3bb7 100644 --- a/stb_textedit.h +++ b/stb_textedit.h @@ -959,7 +959,7 @@ retry: stb_textedit_clamp(str, state); stb_textedit_prep_selection_at_cursor(state); stb_textedit_find_charpos(&find, str, state->cursor, state->single_line); - state->select_end = find.first_char; + state->cursor = state->select_end = find.first_char; state->has_preferred_x = 0; break; } @@ -969,7 +969,7 @@ retry: stb_textedit_clamp(str, state); stb_textedit_prep_selection_at_cursor(state); stb_textedit_find_charpos(&find, str, state->cursor, state->single_line); - state->select_end = find.first_char + find.length; + state->cursor = state->select_end = find.first_char + find.length; state->has_preferred_x = 0; break; }