|
@@ -13087,7 +13087,8 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
|
|
|
/* cursor */
|
|
|
if (edit->select_start == edit->select_end)
|
|
|
{
|
|
|
- if (edit->cursor == nk_str_len(&edit->string) || (cursor_ptr && *cursor_ptr == '\n')) {
|
|
|
+ if (edit->cursor >= nk_str_len(&edit->string) ||
|
|
|
+ (cursor_ptr && *cursor_ptr == '\n')) {
|
|
|
/* draw cursor at end of line */
|
|
|
struct nk_rect cursor;
|
|
|
cursor.w = style->cursor_size;
|