Text edit scrolls less when typing past the end

pull/655/head
Aneesh Roy 2018-03-30 14:04:30 +01:00
parent 28ec29b519
commit 33d8b8f187
1 changed files with 1 additions and 1 deletions

View File

@ -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) {