From 33d8b8f187dd6834af4cb14068def47ac85cc724 Mon Sep 17 00:00:00 2001 From: Aneesh Roy Date: Fri, 30 Mar 2018 14:04:30 +0100 Subject: [PATCH] Text edit scrolls less when typing past the end --- nuklear.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuklear.h b/nuklear.h index dacc4e9e..3f8105bc 100644 --- a/nuklear.h +++ b/nuklear.h @@ -17157,7 +17157,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out, if (cursor_pos.x < edit->scrollbar.x) edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x - scroll_increment); if (cursor_pos.x >= edit->scrollbar.x + area.w) - edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x); + edit->scrollbar.x = (float)(int)NK_MAX(0.0f, edit->scrollbar.x + scroll_increment); } else edit->scrollbar.x = 0; if (flags & NK_EDIT_MULTILINE) {