Mercurial > pidgin
comparison finch/libgnt/gntentry.c @ 24553:2675fda76ddf
Do not alter the killring on delete-prev or delete-next (char) operations.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 27 Nov 2008 20:53:51 +0000 |
parents | f658f9a84fe9 |
children | e1c3a984e47a |
comparison
equal
deleted
inserted
replaced
24552:f10aba5592c6 | 24553:2675fda76ddf |
---|---|
363 | 363 |
364 if (entry->cursor <= entry->start) | 364 if (entry->cursor <= entry->start) |
365 return TRUE; | 365 return TRUE; |
366 | 366 |
367 len = entry->cursor - g_utf8_find_prev_char(entry->start, entry->cursor); | 367 len = entry->cursor - g_utf8_find_prev_char(entry->start, entry->cursor); |
368 update_kill_ring(entry, ENTRY_DEL_BWD_CHAR, entry->cursor, -len); | 368 update_kill_ring(entry, ENTRY_JAIL, entry->cursor, -len); |
369 entry->cursor -= len; | 369 entry->cursor -= len; |
370 | 370 |
371 memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor); | 371 memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor); |
372 entry->end -= len; | 372 entry->end -= len; |
373 | 373 |
389 | 389 |
390 if (entry->cursor >= entry->end) | 390 if (entry->cursor >= entry->end) |
391 return FALSE; | 391 return FALSE; |
392 | 392 |
393 len = g_utf8_find_next_char(entry->cursor, NULL) - entry->cursor; | 393 len = g_utf8_find_next_char(entry->cursor, NULL) - entry->cursor; |
394 update_kill_ring(entry, ENTRY_DEL_FWD_CHAR, entry->cursor, len); | 394 update_kill_ring(entry, ENTRY_JAIL, entry->cursor, len); |
395 memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor - len + 1); | 395 memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor - len + 1); |
396 entry->end -= len; | 396 entry->end -= len; |
397 entry_redraw(GNT_WIDGET(entry)); | 397 entry_redraw(GNT_WIDGET(entry)); |
398 | 398 |
399 if (entry->ddown) | 399 if (entry->ddown) |