diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | sherlock_nk.c | 12 |
2 files changed, 8 insertions, 6 deletions
@@ -1 +1 @@ -0.11.2727 +0.11.2729 diff --git a/sherlock_nk.c b/sherlock_nk.c index 65233b5..d82c357 100644 --- a/sherlock_nk.c +++ b/sherlock_nk.c @@ -224,7 +224,7 @@ _clear(plughandle_t *handle) _clear_items(handle); nk_str_clear(&handle->str); handle->selected = NULL; - handle->counter = 0; + handle->counter = 1; } void @@ -430,14 +430,16 @@ port_event(LV2UI_Handle instance, uint32_t i, uint32_t size, uint32_t urid, } case 2: { - if(handle->state.block) + const bool overflow = handle->n_item > MAX_LINES; + + if(overflow && handle->state.overwrite) { - break; + _clear(handle); } - if( (handle->n_item > MAX_LINES) && handle->state.overwrite) + if(overflow || handle->state.block) { - _clear(handle); + break; } const LV2_Atom *atom = buf; |