mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-24 03:16:52 +03:00
Cut and renumber fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
ef12311948
commit
5146fec04c
@ -1,8 +1,16 @@
|
||||
CVS code -
|
||||
- cut.c:
|
||||
do_uncut_text()
|
||||
- Fix renumbering bug when uncutting marked test at filebot.
|
||||
- Fix screen not being displayed when we are uncutting marked
|
||||
text at editbot (Bug discovered by Ken Tyler).
|
||||
- files.c:
|
||||
write_file()
|
||||
- Change open call flags, basically copy joe's way of doing it so
|
||||
a more recent version will actually be included in (un)stable.
|
||||
- nano.c:
|
||||
renumber()
|
||||
- Dont stupidly assign the value of prev->lineno if prev == NULL!
|
||||
|
||||
nano 0.9.23 - 12/08/2000
|
||||
General
|
||||
|
12
cut.c
12
cut.c
@ -271,7 +271,7 @@ int do_cut_text(void)
|
||||
|
||||
int do_uncut_text(void)
|
||||
{
|
||||
filestruct *tmp = current, *fileptr = current, *newbuf, *newend;
|
||||
filestruct *tmp = current, *hold = current, *fileptr = current, *newbuf, *newend;
|
||||
#ifndef NANO_SMALL
|
||||
char *tmpstr, *tmpstr2;
|
||||
#endif
|
||||
@ -339,8 +339,12 @@ int do_uncut_text(void)
|
||||
|
||||
if (tmp != NULL)
|
||||
tmp->prev = newend;
|
||||
else
|
||||
else {
|
||||
/* Fix the editbot pointer too */
|
||||
if (editbot == filebot)
|
||||
editbot = newend;
|
||||
filebot = newend;
|
||||
}
|
||||
|
||||
/* Now why don't we update the totsize also */
|
||||
for (tmp = current->next; tmp != newend; tmp = tmp->next)
|
||||
@ -368,7 +372,9 @@ int do_uncut_text(void)
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
}
|
||||
renumber(current->prev);
|
||||
/* Renumber from BEFORE where we pasted ;) */
|
||||
renumber(hold);
|
||||
|
||||
dump_buffer(fileage);
|
||||
dump_buffer(cutbuffer);
|
||||
set_modified();
|
||||
|
Loading…
Reference in New Issue
Block a user