aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-12-22 20:50:18 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-12-22 20:50:18 +0100
commit928cd5f2dd3285f3ead24734c7ef01a7f553f224 (patch)
treeabb2dc74fe0fdf37bfe3e66de48028e7312cb978
parent3074c95bd755cf7e1ea95207942ba7d8222822a7 (diff)
downloadmidi_matrix.lv2-928cd5f2dd3285f3ead24734c7ef01a7f553f224.tar.xz
omk: fix lost scrollbar state in nk_edit_buffer.
-rw-r--r--nuklear.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nuklear.h b/nuklear.h
index 5fa4a51..67f4be3 100644
--- a/nuklear.h
+++ b/nuklear.h
@@ -14289,7 +14289,11 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
if (!prev_state && edit->active) {
const enum nk_text_edit_type type = (flags & NK_EDIT_MULTILINE) ?
NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE;
+ const int cursor = edit->cursor;
+ const struct nk_vec2 scrollbar = edit->scrollbar;
nk_textedit_clear_state(edit, type, filter);
+ edit->cursor = cursor;
+ edit->scrollbar = scrollbar;
if (flags & NK_EDIT_ALWAYS_INSERT_MODE)
edit->mode = NK_TEXT_EDIT_MODE_INSERT;
if (flags & NK_EDIT_AUTO_SELECT)