@@ 1616,6 1616,7 @@ prev_match(struct DrawState* state)
search_len = u32_strlen(state->search);
for (size_t row = state->coord.row + 1; row > 0; row--)
{
+ const uint32_t* save_found;
current = state->buffer + row - 1;
found = current->text;
if (!found)
@@ 1629,7 1630,7 @@ prev_match(struct DrawState* state)
found += current->length - search_len + 1;
prev_match_loop:
- const uint32_t* save_found = found;
+ save_found = found;
found = u32_strrstr(current->text, state->search, found);
if (found)
{
@@ 1839,6 1840,7 @@ simple_yank(struct DrawState* state)
}
state->paste_count = ser - ssr + 1;
+ initialize_start = state->paste_size;
if (!state->paste_size)
{
initialize_start = 0;
@@ 1848,7 1850,6 @@ simple_yank(struct DrawState* state)
}
else if (state->paste_count > state->paste_size)
{
- initialize_start = state->paste_size;
while (state->paste_count > state->paste_size)
state->paste_size += ALLOC_DELTA;
newbuf = realloc(state->paste,