mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Don't keep cutbufer on reset, fix -k cut on first line if blank
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
cf785632ed
commit
1cde322359
@ -73,6 +73,8 @@ Cvs code -
|
|||||||
page_up()
|
page_up()
|
||||||
- Rewritten with a loop to make screen updates work when
|
- Rewritten with a loop to make screen updates work when
|
||||||
mark is set (fixes bug #59).
|
mark is set (fixes bug #59).
|
||||||
|
do_home(), do_end()
|
||||||
|
- Don't keep cutbuffer.
|
||||||
- nano.1:
|
- nano.1:
|
||||||
- Added the missing -r flag (Jordi).
|
- Added the missing -r flag (Jordi).
|
||||||
- nano.c:
|
- nano.c:
|
||||||
|
9
cut.c
9
cut.c
@ -187,10 +187,15 @@ int do_cut_text(void)
|
|||||||
|
|
||||||
/* If the next line is empty, create a dummy line and add it
|
/* If the next line is empty, create a dummy line and add it
|
||||||
to the cutbuffer */
|
to the cutbuffer */
|
||||||
if (current->next != NULL && strlen(current->next->data) == 0) {
|
if ((current->next != NULL && strlen(current->next->data) == 0) ||
|
||||||
|
(current == fileage && strlen(current->data) == 0)) {
|
||||||
filestruct *junk;
|
filestruct *junk;
|
||||||
|
|
||||||
junk = copy_node(current->next);
|
if (current == fileage)
|
||||||
|
junk = copy_node(current);
|
||||||
|
else
|
||||||
|
junk = copy_node(current->next);
|
||||||
|
|
||||||
add_to_cutbuffer(junk);
|
add_to_cutbuffer(junk);
|
||||||
}
|
}
|
||||||
do_delete();
|
do_delete();
|
||||||
|
2
move.c
2
move.c
@ -86,6 +86,7 @@ int page_down(void)
|
|||||||
|
|
||||||
int do_home(void)
|
int do_home(void)
|
||||||
{
|
{
|
||||||
|
UNSET(KEEP_CUTBUFFER);
|
||||||
current_x = 0;
|
current_x = 0;
|
||||||
placewewant = 0;
|
placewewant = 0;
|
||||||
update_line(current, current_x);
|
update_line(current, current_x);
|
||||||
@ -94,6 +95,7 @@ int do_home(void)
|
|||||||
|
|
||||||
int do_end(void)
|
int do_end(void)
|
||||||
{
|
{
|
||||||
|
UNSET(KEEP_CUTBUFFER);
|
||||||
current_x = strlen(current->data);
|
current_x = strlen(current->data);
|
||||||
placewewant = xplustabs();
|
placewewant = xplustabs();
|
||||||
update_line(current, current_x);
|
update_line(current, current_x);
|
||||||
|
Loading…
Reference in New Issue
Block a user