tweaks: shorten a comment and trim an #ifdef
parent
735757b0c1
commit
823d79b36c
|
@ -457,8 +457,7 @@ bool open_buffer(const char *filename, bool new_one)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When we've loaded a file into a new buffer, set the filename
|
/* For a new buffer, store filename and put cursor at start of buffer. */
|
||||||
* and put the cursor at the start of the buffer. */
|
|
||||||
if (descriptor >= 0 && new_one) {
|
if (descriptor >= 0 && new_one) {
|
||||||
openfile->filename = mallocstrcpy(openfile->filename, realname);
|
openfile->filename = mallocstrcpy(openfile->filename, realname);
|
||||||
openfile->current = openfile->filetop;
|
openfile->current = openfile->filetop;
|
||||||
|
@ -471,6 +470,7 @@ bool open_buffer(const char *filename, bool new_one)
|
||||||
if (new_one)
|
if (new_one)
|
||||||
find_and_prime_applicable_syntax();
|
find_and_prime_applicable_syntax();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
free(realname);
|
free(realname);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -658,9 +658,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
format_type format = NIX_FILE;
|
format_type format = NIX_FILE;
|
||||||
/* The type of line ending the file uses: Unix, DOS, or Mac. */
|
/* The type of line ending the file uses: Unix, DOS, or Mac. */
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
|
||||||
if (undoable)
|
if (undoable)
|
||||||
add_undo(INSERT, NULL);
|
add_undo(INSERT, NULL);
|
||||||
|
|
||||||
|
@ -1286,7 +1284,7 @@ void do_insertfile(bool execute)
|
||||||
{
|
{
|
||||||
/* If the file actually changed, mark it as modified. */
|
/* If the file actually changed, mark it as modified. */
|
||||||
if (openfile->current->lineno != was_current_lineno ||
|
if (openfile->current->lineno != was_current_lineno ||
|
||||||
openfile->current_x != was_current_x)
|
openfile->current_x != was_current_x)
|
||||||
set_modified();
|
set_modified();
|
||||||
|
|
||||||
refresh_needed = TRUE;
|
refresh_needed = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue