mirror of git://git.sv.gnu.org/nano.git
2009-11-22 Chris Allegretta <chrisa@asty.org>
* nano.c (main): Allow edit_refresh_needed to take effect when using --enable-tiny (fixes Savannah bug 28076 reported by David Lawrence Ramsey). 2009-11-22 David Lawrence Ramsey <pooka109@gmail.com> * nano.c (move_to_filestruct): Fix bug 71 (cut at top of line recenters) * Fix compilation with --enable-tiny git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
0bff84ef9c
commit
8b6f6fcc1b
2
BUGS
2
BUGS
|
@ -1,5 +1,4 @@
|
||||||
** Open BUGS **
|
** Open BUGS **
|
||||||
- Cutting the line at the top of the screen recenters to center (71)
|
|
||||||
|
|
||||||
** Fixed BUGS **
|
** Fixed BUGS **
|
||||||
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
||||||
|
@ -156,6 +155,7 @@
|
||||||
assigned to it (79 - may not be worth fixing) [FIXED]
|
assigned to it (79 - may not be worth fixing) [FIXED]
|
||||||
- Segfault editing at COLS presumably due to new color syntax
|
- Segfault editing at COLS presumably due to new color syntax
|
||||||
highlighting (80) [FIXED]
|
highlighting (80) [FIXED]
|
||||||
|
- Cutting the line at the top of the screen recenters to center (71) [FIXED]
|
||||||
|
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2009-11-22 Chris Allegretta <chrisa@asty.org>
|
||||||
|
* nano.c (main): Allow edit_refresh_needed to take effect when using --enable-tiny
|
||||||
|
(fixes Savannah bug 28076 reported by David Lawrence Ramsey).
|
||||||
|
|
||||||
|
2009-11-22 David Lawrence Ramsey <pooka109@gmail.com>
|
||||||
|
* nano.c (move_to_filestruct): Fix bug 71 (cut at top of line recenters)
|
||||||
|
* Fix compilation with --enable-tiny
|
||||||
|
|
||||||
2009-11-22 Mike Frysinger <vapier@gentoo.org>
|
2009-11-22 Mike Frysinger <vapier@gentoo.org>
|
||||||
* doc/syntax/gentoo.nanorc: Tweak comment highlighting.
|
* doc/syntax/gentoo.nanorc: Tweak comment highlighting.
|
||||||
|
|
||||||
|
|
30
src/nano.c
30
src/nano.c
|
@ -394,11 +394,7 @@ void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
|
||||||
/* If the top of the edit window was inside the old partition, put
|
/* If the top of the edit window was inside the old partition, put
|
||||||
* it in range of current. */
|
* it in range of current. */
|
||||||
if (edittop_inside)
|
if (edittop_inside)
|
||||||
edit_update(
|
edit_update(NONE);
|
||||||
#ifndef NANO_TINY
|
|
||||||
ISSET(SMOOTH_SCROLL) ? NONE :
|
|
||||||
#endif
|
|
||||||
CENTER);
|
|
||||||
|
|
||||||
/* Renumber starting with the beginning line of the old
|
/* Renumber starting with the beginning line of the old
|
||||||
* partition. */
|
* partition. */
|
||||||
|
@ -638,7 +634,11 @@ void die(const char *msg, ...)
|
||||||
if (filepart != NULL)
|
if (filepart != NULL)
|
||||||
unpartition_filestruct(&filepart);
|
unpartition_filestruct(&filepart);
|
||||||
|
|
||||||
die_save_file(openfile->filename, openfile->current_stat);
|
die_save_file(openfile->filename
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
, openfile->current_stat
|
||||||
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
|
@ -651,7 +651,11 @@ void die(const char *msg, ...)
|
||||||
|
|
||||||
/* Save the current file buffer if it's been modified. */
|
/* Save the current file buffer if it's been modified. */
|
||||||
if (openfile->modified)
|
if (openfile->modified)
|
||||||
die_save_file(openfile->filename, openfile->current_stat);
|
die_save_file(openfile->filename
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
, openfile->current_stat
|
||||||
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -662,7 +666,11 @@ void die(const char *msg, ...)
|
||||||
|
|
||||||
/* Save the current file under the name spacified in die_filename, which
|
/* Save the current file under the name spacified in die_filename, which
|
||||||
* is modified to be unique if necessary. */
|
* is modified to be unique if necessary. */
|
||||||
void die_save_file(const char *die_filename, struct stat *die_stat)
|
void die_save_file(const char *die_filename
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
, struct stat *die_stat
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
char *retval;
|
char *retval;
|
||||||
bool failed = TRUE;
|
bool failed = TRUE;
|
||||||
|
@ -691,6 +699,7 @@ void die_save_file(const char *die_filename, struct stat *die_stat)
|
||||||
fprintf(stderr, _("\nBuffer not written: %s\n"),
|
fprintf(stderr, _("\nBuffer not written: %s\n"),
|
||||||
_("Too many backup files?"));
|
_("Too many backup files?"));
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
/* Try and chmod/chown the save file to the values of the original file, but
|
/* Try and chmod/chown the save file to the values of the original file, but
|
||||||
dont worry if it fails because we're supposed to be bailing as fast
|
dont worry if it fails because we're supposed to be bailing as fast
|
||||||
as possible. */
|
as possible. */
|
||||||
|
@ -699,6 +708,7 @@ void die_save_file(const char *die_filename, struct stat *die_stat)
|
||||||
shush = chmod(retval, die_stat->st_mode);
|
shush = chmod(retval, die_stat->st_mode);
|
||||||
shush = chown(retval, die_stat->st_uid, die_stat->st_gid);
|
shush = chown(retval, die_stat->st_uid, die_stat->st_gid);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
free(retval);
|
free(retval);
|
||||||
}
|
}
|
||||||
|
@ -1621,6 +1631,7 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
||||||
&& openfile->syntax->nmultis > 0) {
|
&& openfile->syntax->nmultis > 0) {
|
||||||
reset_multis(openfile->current, FALSE);
|
reset_multis(openfile->current, FALSE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (edit_refresh_needed) {
|
if (edit_refresh_needed) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
|
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
|
||||||
|
@ -1629,7 +1640,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
||||||
edit_refresh_needed = FALSE;
|
edit_refresh_needed = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2404,10 +2414,12 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
#endif /* ENABLE_NANORC */
|
#endif /* ENABLE_NANORC */
|
||||||
|
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
/* Overwrite an rcfile "set nowrap" or --disable-wrapping-as-root
|
/* Overwrite an rcfile "set nowrap" or --disable-wrapping-as-root
|
||||||
if a --fill option was given on the command line. */
|
if a --fill option was given on the command line. */
|
||||||
if (fill_used)
|
if (fill_used)
|
||||||
UNSET(NO_WRAP);
|
UNSET(NO_WRAP);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If we're using bold text instead of reverse video text, set it up
|
/* If we're using bold text instead of reverse video text, set it up
|
||||||
* now. */
|
* now. */
|
||||||
|
|
|
@ -428,7 +428,11 @@ void free_openfilestruct(openfilestruct *src);
|
||||||
void print_view_warning(void);
|
void print_view_warning(void);
|
||||||
void finish(void);
|
void finish(void);
|
||||||
void die(const char *msg, ...);
|
void die(const char *msg, ...);
|
||||||
void die_save_file(const char *die_filename, struct stat *die_stat);
|
void die_save_file(const char *die_filename
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
, struct stat *die_stat
|
||||||
|
#endif
|
||||||
|
);
|
||||||
void window_init(void);
|
void window_init(void);
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
void disable_mouse_support(void);
|
void disable_mouse_support(void);
|
||||||
|
|
Loading…
Reference in New Issue