- if (ret == RDLINE_RES_VALIDATED) {
- buffer = rdline_get_buffer(&cl->rdl);
- history = rdline_get_history_item(&cl->rdl, 0);
- if (history) {
- same = !memcmp(buffer, history, strlen(history)) &&
- buffer[strlen(history)] == '\n';
- }
- else
- same = 0;
- if (strlen(buffer) > 1 && !same)
- rdline_add_history(&cl->rdl, buffer);
+ if (ret == RDLINE_RES_VALIDATED &&
+ cl->rdl.status == RDLINE_STOPPED)
+ break;
+
+ if (ret == RDLINE_RES_VALIDATED)