diff options
Diffstat (limited to 'src/fe-text/gui-entry.c')
-rw-r--r-- | src/fe-text/gui-entry.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index e0b1e8e0..ecf3fc92 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -551,12 +551,12 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, int update_cutbuffer) g_return_if_fail(entry != NULL); - if (entry->pos < size) + if (size == 0 || entry->pos < size) return; if (update_cutbuffer) { /* put erased text to cutbuffer */ - if (entry->cutbuffer == NULL || entry->cutbuffer_len < size) { + if (entry->cutbuffer_len < size) { g_free(entry->cutbuffer); entry->cutbuffer = g_new(unichar, size+1); } @@ -567,11 +567,6 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, int update_cutbuffer) size * sizeof(unichar)); } - if (size == 0) { - /* we just wanted to clear the cutbuffer */ - return; - } - if (entry->utf8) w = cell_width(entry->text + entry->pos - size, entry->pos - size + 1)-1; |