Commit 819e3db7 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Move previous and next buffer code to main loop instead of do_toggles()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 2d7893d0
No related merge requests found
Showing with 1008 additions and 1053 deletions
+1008 -1053
......@@ -57,27 +57,24 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CURSES_LIB = @CURSES_LIB@
DATADIRNAME = @DATADIRNAME@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_CONFIG = @GLIB_CONFIG@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
......@@ -87,6 +84,7 @@ RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
bin_PROGRAMS = nano
nano_SOURCES = color.c cut.c files.c global.c move.c nano.c nano.h proto.h rcfile.c search.c utils.c winio.c
......
This diff is collapsed.
......@@ -31,6 +31,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
......@@ -58,6 +61,21 @@
/* Define this if your curses lib has the _use_keypad flag */
#undef HAVE_USEKEYPAD
/* Define this if you have NLS */
#undef ENABLE_NLS
/* Define this is you have the catgets command */
#undef HAVE_CATGETS
/* Define this is you have GNU gettext */
#undef HAVE_GETTEXT
/* Define this for HAVE_LC_MESSAGES */
#undef HAVE_LC_MESSAGES
/* Define this if you have the stpcpy function (cool) */
#undef HAVE_STPCPY
/* Define this to make the nano executable as small as possible */
#undef NANO_SMALL
......@@ -112,36 +130,15 @@
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the feof_unlocked function. */
#undef HAVE_FEOF_UNLOCKED
/* Define if you have the fgets_unlocked function. */
#undef HAVE_FGETS_UNLOCKED
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getegid function. */
#undef HAVE_GETEGID
/* Define if you have the geteuid function. */
#undef HAVE_GETEUID
/* Define if you have the getgid function. */
#undef HAVE_GETGID
/* Define if you have the getopt_long function. */
#undef HAVE_GETOPT_LONG
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the getuid function. */
#undef HAVE_GETUID
/* Define if you have the mempcpy function. */
#undef HAVE_MEMPCPY
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
......@@ -169,12 +166,6 @@
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strtoul function. */
#undef HAVE_STRTOUL
/* Define if you have the tsearch function. */
#undef HAVE_TSEARCH
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
......@@ -208,12 +199,6 @@
/* Define if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
......@@ -229,28 +214,12 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if translation of program messages to the user's native language
is requested. */
#undef ENABLE_NLS
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
This diff is collapsed.
......@@ -2284,41 +2284,21 @@ void do_toggle(int which)
display_main_list();
break;
#ifdef ENABLE_LOADONINSERT
case NANO_OPENPREV_KEY:
open_prevfile(0);
break;
case NANO_OPENNEXT_KEY:
open_nextfile(0);
break;
#endif
}
#ifdef ENABLE_LOADONINSERT
/* NANO_OPENPREV_KEY and NANO_OPENNEXT_KEY aren't really toggles, so
don't display anything on the statusbar if they're pressed */
if (toggles[which].val != NANO_OPENPREV_KEY &&
toggles[which].val != NANO_OPENNEXT_KEY) {
#endif
if (!ISSET(toggles[which].flag)) {
if (toggles[which].val == TOGGLE_NOHELP_KEY ||
toggles[which].val == TOGGLE_WRAP_KEY)
statusbar("%s %s", toggles[which].desc, enabled);
else
statusbar("%s %s", toggles[which].desc, disabled);
} else {
if (toggles[which].val == TOGGLE_NOHELP_KEY ||
toggles[which].val == TOGGLE_WRAP_KEY)
statusbar("%s %s", toggles[which].desc, disabled);
else
statusbar("%s %s", toggles[which].desc, enabled);
}
#ifdef ENABLE_LOADONINSERT
if (!ISSET(toggles[which].flag)) {
if (toggles[which].val == TOGGLE_NOHELP_KEY ||
toggles[which].val == TOGGLE_WRAP_KEY)
statusbar("%s %s", toggles[which].desc, enabled);
else
statusbar("%s %s", toggles[which].desc, disabled);
} else {
if (toggles[which].val == TOGGLE_NOHELP_KEY ||
toggles[which].val == TOGGLE_WRAP_KEY)
statusbar("%s %s", toggles[which].desc, disabled);
else
statusbar("%s %s", toggles[which].desc, enabled);
}
#endif
SET(DISABLE_CURPOS);
......@@ -2787,8 +2767,15 @@ int main(int argc, char *argv[])
break;
}
break;
case NANO_OPENPREV_KEY:
open_prevfile(0);
keyhandled = 1;
break;
case NANO_OPENNEXT_KEY:
open_nextfile(0);
keyhandled = 1;
break;
default:
/* Check for the altkey defs.... */
for (i = 0; i <= MAIN_LIST_LEN - 1; i++)
if (kbinput == main_list[i].altval ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment