mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
Rename a variable, to match the save routine.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
5b350b86ba
commit
583b67bad2
@ -1,5 +1,6 @@
|
|||||||
2016-01-12 Benno Schulenberg <bensberg@justemail.net>
|
2016-01-12 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* NEWS: Fix some typos and whitespace, and normalize the dates.
|
* NEWS: Fix some typos and whitespace, and normalize the dates.
|
||||||
|
* src/files.c (load_poshistory): Rename a variable.
|
||||||
|
|
||||||
GNU nano 2.5.1 - 2016.01.11
|
GNU nano 2.5.1 - 2016.01.11
|
||||||
|
|
||||||
|
10
src/files.c
10
src/files.c
@ -3200,17 +3200,17 @@ int check_poshistory(const char *file, ssize_t *line, ssize_t *column)
|
|||||||
/* Load the recorded file positions from ~/.nano/filepos_history. */
|
/* Load the recorded file positions from ~/.nano/filepos_history. */
|
||||||
void load_poshistory(void)
|
void load_poshistory(void)
|
||||||
{
|
{
|
||||||
char *nanohist = poshistfilename();
|
char *poshist = poshistfilename();
|
||||||
|
|
||||||
/* Assume do_rcfile() has reported a missing home directory. */
|
/* Assume do_rcfile() has reported a missing home directory. */
|
||||||
if (nanohist != NULL) {
|
if (poshist != NULL) {
|
||||||
FILE *hist = fopen(nanohist, "rb");
|
FILE *hist = fopen(poshist, "rb");
|
||||||
|
|
||||||
if (hist == NULL) {
|
if (hist == NULL) {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
/* Don't save history when we quit. */
|
/* Don't save history when we quit. */
|
||||||
UNSET(POS_HISTORY);
|
UNSET(POS_HISTORY);
|
||||||
history_error(N_("Error reading %s: %s"), nanohist,
|
history_error(N_("Error reading %s: %s"), poshist,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -3252,7 +3252,7 @@ void load_poshistory(void)
|
|||||||
fclose(hist);
|
fclose(hist);
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
free(nanohist);
|
free(poshist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !DISABLE_HISTORIES */
|
#endif /* !DISABLE_HISTORIES */
|
||||||
|
Loading…
Reference in New Issue
Block a user