diff -rc nano-1.1.6/files.c nano-1.1.6-patch/files.c *** nano-1.1.6/files.c Fri Jan 4 19:45:44 2002 --- nano-1.1.6-patch/files.c Sun Feb 17 09:33:29 2002 *************** *** 393,401 **** UNSET(MODIFIED); } #endif ! i = open_file(realname, 1, 0); ! #ifdef ENABLE_MULTIBUFFER if (loading_file) filename = mallocstrcpy(filename, realname); --- 393,413 ---- UNSET(MODIFIED); } #endif ! #ifdef ENABLE_MULTIBUFFER ! if ((i == NANO_CONTROL_N) && (ISSET(MULTIBUFFER))) { ! add_open_file(0, 0); ! statusbar(_("New File")); ! } ! else if ((i == NANO_CONTROL_N) && (!ISSET(MULTIBUFFER))) { ! statusbar(_("Multiple Buffers not Enabled")); ! return; ! } ! else { ! i = open_file(realname, 1, 0); ! } ! #else i = open_file(realname, 1, 0); ! #endif #ifdef ENABLE_MULTIBUFFER if (loading_file) filename = mallocstrcpy(filename, realname); *************** *** 406,413 **** dump_buffer(fileage); #ifdef ENABLE_MULTIBUFFER ! if (loading_file) load_file(0); else #endif --- 418,427 ---- dump_buffer(fileage); #ifdef ENABLE_MULTIBUFFER ! if ((loading_file) && (i != NANO_CONTROL_N)) load_file(0); + else if ((loading_file) && (i == NANO_CONTROL_N) && (ISSET(MULTIBUFFER))) + load_file(1); else #endif *************** *** 555,561 **** #ifdef DEBUG fprintf(stderr, _("filename is %s"), open_files->data); #endif - return 0; } --- 569,574 ---- diff -rc nano-1.1.6/global.c nano-1.1.6-patch/global.c *** nano-1.1.6/global.c Wed Jan 9 18:50:38 2002 --- nano-1.1.6-patch/global.c Sun Feb 17 09:32:04 2002 *************** *** 247,252 **** --- 247,256 ---- "", *nano_enter_msg = "", *nano_cancel_msg = "", *nano_unjustify_msg = "", *nano_append_msg = ""; + #ifdef ENABLE_MULTIBUFFER + char *nano_newfile_msg = ""; + #endif + #ifndef NANO_SMALL char *nano_tofiles_msg = "", *nano_gotodir_msg = "", *nano_case_msg = "", *nano_reverse_msg = ""; *************** *** 259,264 **** --- 263,269 ---- #ifdef ENABLE_MULTIBUFFER nano_exit_msg = _("Close currently loaded file/Exit from nano"); + nano_newfile_msg = _("Open Empty Buffer"); #else nano_exit_msg = _("Exit from nano"); #endif *************** *** 572,578 **** sc_init_one(&insertfile_list[2], NANO_TOFILES_KEY, _("To Files"), nano_tofiles_msg, 0, 0, 0, NOVIEW, 0); #endif ! sc_init_one(&spell_list[0], NANO_HELP_KEY, _("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help); --- 577,586 ---- sc_init_one(&insertfile_list[2], NANO_TOFILES_KEY, _("To Files"), nano_tofiles_msg, 0, 0, 0, NOVIEW, 0); #endif ! #ifdef ENABLE_MULTIBUFFER ! sc_init_one(&insertfile_list[3], NANO_CONTROL_N, _("New File"), ! nano_newfile_msg, 0, 0, 0, NOVIEW, 0); ! #endif sc_init_one(&spell_list[0], NANO_HELP_KEY, _("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help); diff -rc nano-1.1.6/nano.h nano-1.1.6-patch/nano.h *** nano-1.1.6/nano.h Sat Jan 19 10:52:34 2002 --- nano-1.1.6-patch/nano.h Sun Feb 17 09:32:20 2002 *************** *** 338,352 **** #ifdef ENABLE_MULTIBUFFER #define MULTI_TOGGLES 3 #else #define MULTI_TOGGLES 0 #endif #define WHEREIS_LIST_LEN (9 - NO_REGEX - NO_TOGGLES) #define REPLACE_LIST_LEN (9 - NO_REGEX - NO_TOGGLES) #define TOGGLE_LEN (14 - NO_REGEX + MULTI_TOGGLES) #define WRITEFILE_LIST_LEN (4 - NO_BROWSER) ! #define INSERTFILE_LIST_LEN (3 - NO_BROWSER) #define BROWSER_LIST_LEN 5 #define MAIN_LIST_LEN (27 - NO_REGEX - SMALL_TOO) #define MAIN_VISIBLE 12 --- 338,354 ---- #ifdef ENABLE_MULTIBUFFER #define MULTI_TOGGLES 3 + #define NO_MULTI 0 #else #define MULTI_TOGGLES 0 + #define NO_MULTI 1 #endif #define WHEREIS_LIST_LEN (9 - NO_REGEX - NO_TOGGLES) #define REPLACE_LIST_LEN (9 - NO_REGEX - NO_TOGGLES) #define TOGGLE_LEN (14 - NO_REGEX + MULTI_TOGGLES) #define WRITEFILE_LIST_LEN (4 - NO_BROWSER) ! #define INSERTFILE_LIST_LEN (4 - NO_BROWSER - NO_MULTI) #define BROWSER_LIST_LEN 5 #define MAIN_LIST_LEN (27 - NO_REGEX - SMALL_TOO) #define MAIN_VISIBLE 12 diff -rc nano-1.1.6/winio.c nano-1.1.6-patch/winio.c *** nano-1.1.6/winio.c Sat Jan 19 10:52:34 2002 --- nano-1.1.6-patch/winio.c Sun Feb 17 10:00:33 2002 *************** *** 562,568 **** if (ISSET(MODIFIED)) mvwaddstr(topwin, 0, COLS - 10, _("Modified")); - #ifdef ENABLE_COLOR color_off(topwin, COLOR_TITLEBAR); #else --- 562,567 ----