cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -1562,8 +1562,7 @@ int write_marked_file(const char *name, FILE *f_open, bool tmp,
|
|||||||
/* If the line at filebot is blank, treat it as the magicline and
|
/* If the line at filebot is blank, treat it as the magicline and
|
||||||
* hence the end of the file. Otherwise, add a magicline and treat
|
* hence the end of the file. Otherwise, add a magicline and treat
|
||||||
* it as the end of the file. */
|
* it as the end of the file. */
|
||||||
added_magicline = (openfile->filebot->data[0] != '\0');
|
if ((added_magicline = (openfile->filebot->data[0] != '\0')))
|
||||||
if (added_magicline)
|
|
||||||
new_magicline();
|
new_magicline();
|
||||||
|
|
||||||
retval = write_file(name, f_open, tmp, append, TRUE);
|
retval = write_file(name, f_open, tmp, append, TRUE);
|
||||||
|
|||||||
10
src/nano.c
10
src/nano.c
@@ -1492,11 +1492,11 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
|
|||||||
|
|
||||||
assert(openfile->current_x <= current_len);
|
assert(openfile->current_x <= current_len);
|
||||||
|
|
||||||
charmove(&openfile->current->data[openfile->current_x +
|
charmove(openfile->current->data + openfile->current_x +
|
||||||
char_buf_len],
|
char_buf_len, openfile->current->data +
|
||||||
&openfile->current->data[openfile->current_x],
|
openfile->current_x, current_len - openfile->current_x +
|
||||||
current_len - openfile->current_x + char_buf_len);
|
char_buf_len);
|
||||||
strncpy(&openfile->current->data[openfile->current_x], char_buf,
|
strncpy(openfile->current->data + openfile->current_x, char_buf,
|
||||||
char_buf_len);
|
char_buf_len);
|
||||||
current_len += char_buf_len;
|
current_len += char_buf_len;
|
||||||
openfile->totsize++;
|
openfile->totsize++;
|
||||||
|
|||||||
@@ -312,10 +312,10 @@ void do_statusbar_output(char *output, size_t output_len, bool
|
|||||||
|
|
||||||
assert(statusbar_x <= answer_len);
|
assert(statusbar_x <= answer_len);
|
||||||
|
|
||||||
charmove(&answer[statusbar_x + char_buf_len],
|
charmove(answer + statusbar_x + char_buf_len,
|
||||||
&answer[statusbar_x], answer_len - statusbar_x +
|
answer + statusbar_x, answer_len - statusbar_x +
|
||||||
char_buf_len);
|
char_buf_len);
|
||||||
strncpy(&answer[statusbar_x], char_buf, char_buf_len);
|
strncpy(answer + statusbar_x, char_buf, char_buf_len);
|
||||||
answer_len += char_buf_len;
|
answer_len += char_buf_len;
|
||||||
|
|
||||||
statusbar_x += char_buf_len;
|
statusbar_x += char_buf_len;
|
||||||
|
|||||||
Reference in New Issue
Block a user