diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-12-12 12:35:14 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-12-12 12:35:14 +0000 |
commit | 6331ffdc2bfbdce5d51678c57332f867ce54d0d3 (patch) | |
tree | 96abd8afbf156b5cd9fda8435d04cac45296d6df /src/fe-text/gui-entry.c | |
parent | 66a179b8e43c054e747707fa6e12c1acc4f843c2 (diff) | |
download | irssi-6331ffdc2bfbdce5d51678c57332f867ce54d0d3.zip |
Revert r2471, having the erase commands clear the cutbuffer when the
line is empty is annoying and not useful.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4667 dbcabf3a-b0e7-0310-adc4-f8d773084564
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; |