some random totsize-related bugfixes. (do_justify & do_wrap)
shouldn't break anything (famous last words) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@125 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
461b2a9dfe
commit
a417ddca91
9
BUGS
9
BUGS
|
@ -34,6 +34,11 @@
|
||||||
user exit (29, discovered by Joshua Jensen) [FIXED]
|
user exit (29, discovered by Joshua Jensen) [FIXED]
|
||||||
- Using nano -k, marked text is not cut properly. (31) [FIXED]
|
- Using nano -k, marked text is not cut properly. (31) [FIXED]
|
||||||
- Invoking -t or -k has the effect of invoking both option. (32) [FIXED]
|
- Invoking -t or -k has the effect of invoking both option. (32) [FIXED]
|
||||||
|
- totsize becomes incorrect after word-wrapping (25) [FIXED]
|
||||||
|
- similar problem found and corrected in do_justify
|
||||||
|
- Wrapping a line with autoindent mode sometimes causes a segfault (19)[FIXED]
|
||||||
|
- When inserting files, the display sometimes fails to display properly
|
||||||
|
until a pageup/down occurs (22)[FIXED]
|
||||||
|
|
||||||
** Open BUGS **
|
** Open BUGS **
|
||||||
|
|
||||||
|
@ -45,10 +50,6 @@
|
||||||
program. Nano only uses ispell (for now) (12)
|
program. Nano only uses ispell (for now) (12)
|
||||||
- Cutting a file with marked text and both marker ends on the same line
|
- Cutting a file with marked text and both marker ends on the same line
|
||||||
causes a random segfault (16)
|
causes a random segfault (16)
|
||||||
- Wrapping a line with autoindent mode sometimes causes a segfault (19).
|
|
||||||
- When inserting files, the display sometimes fails to display properly
|
|
||||||
until a pageup/down occurs (22).
|
|
||||||
- totsize becomes incorrect after word-wrapping (25)
|
|
||||||
- In search/replace code there is too much refreshing in bottomwin (26)
|
- In search/replace code there is too much refreshing in bottomwin (26)
|
||||||
- In replace, there is no way to accept the default replace string. (27)
|
- In replace, there is no way to accept the default replace string. (27)
|
||||||
- Using nano -t, user can not exit until a filename is given via ^O. (30)
|
- Using nano -t, user can not exit until a filename is given via ^O. (30)
|
||||||
|
|
|
@ -10,6 +10,9 @@ Changes in CVS -
|
||||||
do_writeout()
|
do_writeout()
|
||||||
- Changed check for filename to filename[0]. Added some code,
|
- Changed check for filename to filename[0]. Added some code,
|
||||||
overall fixes bug #30 =-)
|
overall fixes bug #30 =-)
|
||||||
|
- nano.c:
|
||||||
|
do_justify() & do_wrap():
|
||||||
|
- totsize-related fixes (Rob)
|
||||||
|
|
||||||
nano-0.9.13 - 07/23/2000
|
nano-0.9.13 - 07/23/2000
|
||||||
- Implemented Pico's -k mode. New flag CUT_TO_END, option (-k, --cut),
|
- Implemented Pico's -k mode. New flag CUT_TO_END, option (-k, --cut),
|
||||||
|
|
22
nano.c
22
nano.c
|
@ -844,7 +844,9 @@ void do_wrap(filestruct * inptr, char input_char)
|
||||||
|
|
||||||
|
|
||||||
totlines++;
|
totlines++;
|
||||||
totsize++;
|
/* Everything about it makes me want this line here but it causes
|
||||||
|
* totsize to be high by one for some reason. Sigh. (Rob) */
|
||||||
|
/* totsize++; */
|
||||||
|
|
||||||
renumber(inptr);
|
renumber(inptr);
|
||||||
edit_update_top(edittop);
|
edit_update_top(edittop);
|
||||||
|
@ -1399,20 +1401,24 @@ int do_justify(void)
|
||||||
|
|
||||||
unlink_node(tmpnode);
|
unlink_node(tmpnode);
|
||||||
delete_node(tmpnode);
|
delete_node(tmpnode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
totsize -= strlen(current->data);
|
||||||
|
|
||||||
justify_format(current->data);
|
justify_format(current->data);
|
||||||
|
|
||||||
slen = strlen(current->data);
|
slen = strlen(current->data);
|
||||||
while ((strlenpt(current->data) > (fill))
|
totsize += slen;
|
||||||
|
|
||||||
|
if((strlenpt(current->data) > (fill))
|
||||||
&& !no_spaces(current->data)) {
|
&& !no_spaces(current->data)) {
|
||||||
|
do {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int len2 = 0;
|
int len2 = 0;
|
||||||
filestruct *tmpline = nmalloc(sizeof(filestruct));
|
filestruct *tmpline = nmalloc(sizeof(filestruct));
|
||||||
|
|
||||||
/* Start at fill , unless line isn't that long (but it appears at least
|
/* Start at fill , unless line isn't that long (but it
|
||||||
* fill long with tabs.
|
* appears at least fill long with tabs.
|
||||||
*/
|
*/
|
||||||
if (slen > fill)
|
if (slen > fill)
|
||||||
i = fill;
|
i = fill;
|
||||||
|
@ -1420,7 +1426,7 @@ int do_justify(void)
|
||||||
i = slen;
|
i = slen;
|
||||||
for (; i > 0; i--) {
|
for (; i > 0; i--) {
|
||||||
if (isspace(current->data[i]) &&
|
if (isspace(current->data[i]) &&
|
||||||
((strlenpt(current->data) - strlen(current->data + i)) <=
|
((strlenpt(current->data) - strlen(current->data +i)) <=
|
||||||
fill)) break;
|
fill)) break;
|
||||||
}
|
}
|
||||||
if (!i)
|
if (!i)
|
||||||
|
@ -1446,9 +1452,10 @@ int do_justify(void)
|
||||||
current = tmpline;
|
current = tmpline;
|
||||||
slen -= i + 1;
|
slen -= i + 1;
|
||||||
current_y++;
|
current_y++;
|
||||||
|
} while ((strlenpt(current->data) > (fill))
|
||||||
|
&& !no_spaces(current->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (current->next)
|
if (current->next)
|
||||||
current = current->next;
|
current = current->next;
|
||||||
else
|
else
|
||||||
|
@ -1469,7 +1476,6 @@ int do_justify(void)
|
||||||
fix_editbot();
|
fix_editbot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
statusbar("Justify Complete");
|
statusbar("Justify Complete");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue