2 * Copyright (C) 2008 Diego Hernan Borghetti.
17 /* "kill" buffer, all the text that you cut/remove go here. */
18 E_Buffer
*kill_buf
= NULL
;
20 void e_kill_init(void)
22 kill_buf
= e_buffer_new("KillBuffer");
23 kill_buf
->flag
|= BUFFER_NOIDENT
;
28 e_buffer_free(kill_buf
);
31 void e_kill_cut(E_Line
*ln
)
36 /* only a new line. */
37 e_buffer_newline(kill_buf
);
43 e_buffer_newline(kill_buf
);
47 for (i
= 0; i
< ln
->used
; i
++)
48 e_buffer_insert(kill_buf
, ln
->text
[i
], 1);
51 void e_kill_paste(E_Buffer
*bf
)
55 /* avoid identation. */
56 bf
->flag
|= BUFFER_NOIDENT
;
60 e_buffer_insert_str(bf
, p
->text
, p
->used
);
65 /* Remove the flag. */
66 bf
->flag
&= ~BUFFER_NOIDENT
;
69 void e_kill_clean(void)
71 /* just drop the buffer, this is bad, but work ;) */