1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-22 04:35:58 -04:00

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
This commit is contained in:
Emanuele Giaquinta 2007-12-12 12:35:14 +00:00 committed by exg
parent 66a179b8e4
commit 6331ffdc2b

View File

@ -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;