1
1

- Update man page a little bit more

- Change do_prompt and get_prompt_line to pass meta_key and func_key
  so the calling program can DTRT when it calsl get_shortcut.  In
  particular this allows the "new file buffer" toggle on the insert file
  menu to work, and presumably other rebinding stuff should now work also.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Chris Allegretta 2008-03-14 04:08:51 +00:00
родитель d3a1ff6a33
Коммит 10f868d33c
9 изменённых файлов: 127 добавлений и 96 удалений

8
BUGS
Просмотреть файл

@ -1,10 +1,6 @@
** Open BUGS ** ** Open BUGS **
- Cutting the line at the top of the screen recenters to center (71) - Cutting the line at the top of the screen recenters to center (71)
- Many menu items are probably missing from the new backend (73) - Many menu items are probably missing from the new backend (73)
- Browser and prompt code still implement old switch on raw key input instead
of new if block for subnfunc values (75)
- New backend code probably does not compile under anything but default options,
if that (76)
** Fixed BUGS ** ** Fixed BUGS **
- Marked cutting sometimes leaves a newline in the file unintelligently, - Marked cutting sometimes leaves a newline in the file unintelligently,
@ -149,6 +145,10 @@
- F-keys do not work with new shortcut backend (72) [FIXED] - F-keys do not work with new shortcut backend (72) [FIXED]
- Need a 'check-vitals-mapped' function to check that the end used didn't - Need a 'check-vitals-mapped' function to check that the end used didn't
unbind all the keys for exit or cancel before starting up the editor (74) [FIXED] unbind all the keys for exit or cancel before starting up the editor (74) [FIXED]
- Browser and prompt code still implement old switch on raw key input instead
of new if block for subnfunc values (75) [FIXED]
- New backend code probably does not compile under anything but default options,
if that (76) [FIXED]
- -enable-tiny does not work with new code (78) [FIXED] - -enable-tiny does not work with new code (78) [FIXED]
- If a user only binds meta sequences to a function like left, right - If a user only binds meta sequences to a function like left, right
page up/down, insert, and unbinds all other control and F keys for it, page up/down, insert, and unbinds all other control and F keys for it,

Просмотреть файл

@ -258,249 +258,259 @@ Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
context of menu \fImenu\fP. The format of \fIkey\fP should be one of: context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
.TP .TP
.B ^ .B ^
followed by an alpha character or the word "Space" followed by an alpha character or the word "Space".
Example: ^C
.TP .TP
.B M- .B M-
followed by a prinable character or the word "Space" followed by a prinable character or the word "Space".
Example: M-C
.TP .TP
.B F# .B F
followed by a numeric value from 1-16 followed by a numeric value from 1-16
Example: F10
.TP .TP
Valid function names to be bound include: Valid function names to be bound include:
.TP .TP 3
.B help .B help
Invoke the help menu Invoke the help menu.
.TP .TP
.B cancel .B cancel
Cancel the current command Cancel the current command.
.TP .TP
.B exit .B exit
Exit from the program Exit from the program.
.TP .TP
.B writeout .B writeout
Write the current buffer to disk Write the current buffer to disk.
.TP .TP
.B justify .B justify
Justify text Justify the current text.
.TP .TP
.B insert .B insert
Insert a file into the current buffer (or a new buffer with multi-buffer enbled) Insert a file into the current buffer (or a new buffer with multi-buffer enbled).
.TP .TP
.B whereis .B whereis
Search for text in the program Search for text in the program.
.TP .TP
.B searchagain .B searchagain
Repat the last search command Repat the last search command.
.TP .TP
.B up .B up
Move up in the editor or browser Move up in the editor or browser.
.TP .TP
.B down .B down
Move down in the editor or browser Move down in the editor or browser.
.TP .TP
.B left .B left
Move left in the editor or browser Move left in the editor or browser.
.TP .TP
.B right .B right
Move right in the editor or browser Move right in the editor or browser.
.TP .TP
.B cut .B cut
Cut the current line of text and store it Cut the current line of text and store it.
.TP .TP
.B uncut .B uncut
Copy the currently stored text into the current file location Copy the currently stored text into the current file location.
.TP .TP
.B curpos .B curpos
Show the current line, column, word positions in the file Show the current line, column, word positions in the file.
.TP .TP
.B firstline .B firstline
Move to the first line of the file Move to the first line of the file
.TP .TP
.B lastline .B lastline
Move to the last line of the file Move to the last line of the file.
.TP .TP
.B gotoline .B gotoline
Move to a specific line (and column if specified) Move to a specific line (and column if specified).
.TP .TP
.B replace .B replace
Interactively replace text within the editor Interactively replace text within the editor.
.TP .TP
.B mark .B mark
Begin selecting text for cutting or pasting at the current position Begin selecting text for cutting or pasting at the current position.
.TP .TP
.B copytext .B copytext
Copy the currently marked text without deleting it Copy the currently marked text without deleting it.
.TP .TP
.B indent .B indent
Indent the currently marked text (shift to the right) Indent the currently marked text (shift to the right).
.TP .TP
.B unindent .B unindent
Un-indent the currently marked text (shift to the left) Un-indent the currently marked text (shift to the left).
.TP .TP
.B nextword .B nextword
Move the cursor to the beginning of the next word Move the cursor to the beginning of the next word.
.TP .TP
.B prevword .B prevword
Move the cursor to the beginning of the previous word Move the cursor to the beginning of the previous word.
.TP .TP
.B home .B home
Move the cursor to the beginning of the current line Move the cursor to the beginning of the current line.
.TP .TP
.B end .B end
Move the cursor to the end of the current line Move the cursor to the end of the current line.
.TP .TP
.B beginpara .B beginpara
Move the cursor to the beginning of the current paragraph Move the cursor to the beginning of the current paragraph
.TP .TP
.B endpara .B endpara
Move the cursor to the beginning of the current paragraph Move the cursor to the beginning of the current paragraph.
.TP .TP
.B findbracket .B findbracket
Move the cursor to the matching bracket (brace, etc) of the one under the cursor Move the cursor to the matching bracket (brace, etc) of the one under the cursor.
.TP .TP
.B scrollup .B scrollup
Scroll up one line of text from the current position Scroll up one line of text from the current position.
.TP .TP
.B scrolldown .B scrolldown
Scroll down one line of text from the current position Scroll down one line of text from the current position.
.TP .TP
.B prevbuf .B prevbuf
Switch to editing/viewing the previous buffer when using multibuffer mode Switch to editing/viewing the previous buffer when using multibuffer mode.
.TP .TP
.B nextbuf .B nextbuf
Switch to editing/viewing the next buffer when using multibuffer mode Switch to editing/viewing the next buffer when using multibuffer mode.
.TP .TP
.B verbatim .B verbatim
Insert the next character verbatim into the file Insert the next character verbatim into the file.
.TP .TP
.B tab .B tab
Insert a tab at the current cursor location Insert a tab at the current cursor location.
.TP .TP
.B enter .B enter
Insert a new line below the current one Insert a new line below the current one.
.TP .TP
.B delete .B delete
Delete the character under the cursor Delete the character under the cursor.
.TP .TP
.B fulljustify .B fulljustify
Justify the entire current file Justify the entire current file.
.TP .TP
.B wordcount .B wordcount
Count the number of words in the current buffer Count the number of words in the current buffer.
.TP .TP
.B refresh .B refresh
Refresh the screen Refresh the screen
.TP .TP
.B suspend
Suspend the editor (if the suspend functino is enabled, see the
"suspendenable" entry below.
.TP
.B casesens .B casesens
Toggle case sensitivity in searching (search/replace menus only) Toggle case sensitivity in searching (search/replace menus only).
.TP .TP
.B regexp .B regexp
Toggle whether searches/replaces are based on literal strings or regular expressions Toggle whether searches/replaces are based on literal strings or regular expressions.
.TP .TP
.B prevhistory .B prevhistory
Show the previous history entry in the prompt menus (e.g. search) Show the previous history entry in the prompt menus (e.g. search).
.TP .TP
.B nexthistory .B nexthistory
Show the next history entry in the prompt menus (e.g. search) Show the next history entry in the prompt menus (e.g. search).
.TP .TP
.B dontreplace .B dontreplace
Switch back to searching instead of replacing Switch back to searching instead of replacing.
.TP .TP
.B gototext .B gototext
Search for files matching a string in the file browser (reading or writing files) Search for files matching a string in the file browser (reading or writing files)
.TP .TP
.B dosformat .B dosformat
When writing a file, switch to writing a DOS format (CR/LF) When writing a file, switch to writing a DOS format (CR/LF).
.TP .TP
.B macformat .B macformat
When writing a file, switch to writing a Mac format When writing a file, switch to writing a Mac format.
.TP .TP
.B append .B append
When writing a file, append to the end instead of overwriting When writing a file, append to the end instead of overwriting.
.TP .TP
.B prepend .B prepend
When writing a file, 'prepend' (write at the beginning) instead of overwriting When writing a file, 'prepend' (write at the beginning) instead of overwriting.
.TP .TP
.B backup .B backup
When writing a file, create a backup of the current file When writing a file, create a backup of the current file.
.TP .TP
.B firstfile .B firstfile
Move to the first file when using the file browser (reading or writing files) Move to the first file when using the file browser (reading or writing files).
.TP .TP
.B lastfile .B lastfile
Move to the last file when using the file browser (reading or writing files) Move to the last file when using the file browser (reading or writing files).
.TP .TP
.B nohelp .B nohelp
Toggle showing/hiding the two line list of key bindings at the bottom of the screen Toggle showing/hiding the two line list of key bindings at the bottom of the screen.
.TP .TP
.B constupdate .B constupdate
Constantly display the current line, column, etc position Constantly display the current line, column, etc position.
.TP .TP
.B morespace .B morespace
Toggle showing/hiding the blank space which 'seperates' the 'title' from the file text Toggle showing/hiding the blank space which 'seperates' the 'title' from the file text.
.TP .TP
.B smoothscroll .B smoothscroll
Toggle smooth scrolling when moving via the arrow keys Toggle smooth scrolling when moving via the arrow keys.
.TP .TP
.B whitesplacedisplay .B whitesplacedisplay
.TP .TP
.B smarthome .B smarthome
Toggle whether the smart home key function is enabled Toggle whether the smart home key function is enabled.
.TP .TP
.B autoindent .B autoindent
Toggle whether new lines will conain the same amount of whitespace as the line above Toggle whether new lines will conain the same amount of whitespace as the line above.
.TP .TP
.B cuttoend .B cuttoend
Toggle whether cutting text will cut the whole line or just from the current cursor Toggle whether cutting text will cut the whole line or just from the current cursor.
position to the end of the line position to the end of the line
.TP .TP
.B nowrap .B nowrap
Toggle whether long lines will be wrapped to the next line. Toggle whether long lines will be wrapped to the next line.
.TP .TP
.B suspendenable
Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.
.TP
Valid menu sections are: Valid menu sections are:
.TP .TP
.B main .B main
The main editor window where text is entered The main editor window where text is entered.
.TP .TP
.B search .B search
The search menu (AKA whereis) The search menu (AKA whereis).
.TP .TP
.B replace .B replace
The 'search to replace' menu The 'search to replace' menu.
.TP .TP
.B replacewith .B replacewith
The 'replace with' menu, which comes up after 'search to replace' The 'replace with' menu, which comes up after 'search to replace'.
.TP .TP
.B gotoline .B gotoline
The 'goto line (and column) menu The 'goto line (and column)' menu.
.TP .TP
.B writeout .B writeout
The 'write file' menu The 'write file' menu.
.TP .TP
.B insert .B insert
The 'insert file' menu The 'insert file' menu.
.TP .TP
.B extcmd .B extcmd
The menu for inserting output from an external comman, reached from the insert menu The menu for inserting output from an external comman, reached from the insert menu.
.TP .TP
.B help .B help
The help menu The help menu.
.TP .TP
.B spell .B spell
The interactive spell checker Yes/no menu The interactive spell checker Yes/no menu.
.TP .TP
.B browser .B browser
The file browser for inserting or writing a file The file browser for inserting or writing a file.
.TP .TP
.B whereisfile .B whereisfile
The 'search for a file' menu in the file browser The 'search for a file' menu in the file browser.
.TP .TP
.B gotodir .B gotodir
The 'go to directory' menu The 'go to directory' menu
.TP .TP
.B all .B all
Special symbol for all menus (except the help menu) Special name meaning apply to all menus where this function exists.
.SH FILES .SH FILES
.TP .TP
.I SYSCONFDIR/nanorc .I SYSCONFDIR/nanorc

Просмотреть файл

@ -213,6 +213,7 @@ char *do_browser(char *path, DIR *dir)
FALSE, FALSE,
#endif #endif
MGOTODIR, ans, MGOTODIR, ans,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
NULL, NULL,
#endif #endif
@ -791,6 +792,7 @@ int filesearch_init(void)
TRUE, TRUE,
#endif #endif
MWHEREISFILE, backupstring, MWHEREISFILE, backupstring,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
&search_history, &search_history,
#endif #endif

Просмотреть файл

@ -706,6 +706,8 @@ void do_insertfile(
bool right_side_up = FALSE, single_line = FALSE; bool right_side_up = FALSE, single_line = FALSE;
#endif #endif
currmenu = MINSERTFILE;
while (TRUE) { while (TRUE) {
#ifndef NANO_TINY #ifndef NANO_TINY
if (execute) { if (execute) {
@ -735,11 +737,12 @@ void do_insertfile(
execute ? MEXTCMD : execute ? MEXTCMD :
#endif #endif
MINSERTFILE, ans, MINSERTFILE, ans,
&meta_key, &func_key,
#ifndef DISABLE_OPERATINGDIR
#ifndef NANO_TINY #ifndef NANO_TINY
NULL, NULL,
#endif #endif
edit_refresh, msg, edit_refresh, msg,
#ifndef DISABLE_OPERATINGDIR
operating_dir != NULL && strcmp(operating_dir, operating_dir != NULL && strcmp(operating_dir,
".") != 0 ? operating_dir : ".") != 0 ? operating_dir :
#endif #endif
@ -765,7 +768,7 @@ void do_insertfile(
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
s = get_shortcut(currmenu, &i, &meta_key, &func_key); s = get_shortcut(currmenu, &i, &meta_key, &func_key);
if (s && s->scfunc == (void *) do_toggle && s->toggle == MULTIBUFFER) { if (s && s->scfunc == (void *) new_buffer_msg) {
/* Don't allow toggling if we're in view mode. */ /* Don't allow toggling if we're in view mode. */
if (!ISSET(VIEW_MODE)) if (!ISSET(VIEW_MODE))
TOGGLE(MULTIBUFFER); TOGGLE(MULTIBUFFER);
@ -1871,6 +1874,7 @@ bool do_writeout(bool exiting)
TRUE, TRUE,
#endif #endif
MWRITEFILE, ans, MWRITEFILE, ans,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
NULL, NULL,
#endif #endif

Просмотреть файл

@ -925,7 +925,7 @@ void shortcut_init(bool unjustify)
no_replace_msg, IFSCHELP(nano_whereis_msg), FALSE, VIEW); no_replace_msg, IFSCHELP(nano_whereis_msg), FALSE, VIEW);
add_to_funcs((void *) gototext_msg, MGOTOLINE, add_to_funcs((void *) gototext_msg, MGOTOLINE,
gototext_msg, IFSCHELP(nano_whereis_msg), FALSE, VIEW); gototext_msg, IFSCHELP(nano_whereis_msg), TRUE, VIEW);
#ifndef DISABLE_BROWSER #ifndef DISABLE_BROWSER
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
@ -973,7 +973,7 @@ void shortcut_init(bool unjustify)
/* If we're using restricted mode, the multibuffer toggle is /* If we're using restricted mode, the multibuffer toggle is
* disabled. It's useless since inserting files is disabled. */ * disabled. It's useless since inserting files is disabled. */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
add_to_funcs((void *) new_buffer_msg, MWRITEFILE, add_to_funcs((void *) new_buffer_msg, MINSERTFILE,
new_buffer_msg, nano_multibuffer_msg, FALSE, NOVIEW); new_buffer_msg, nano_multibuffer_msg, FALSE, NOVIEW);
#endif #endif
@ -1127,17 +1127,10 @@ void shortcut_init(bool unjustify)
add_to_sclist(MMAIN, "M-.", switch_to_next_buffer_void, 0, TRUE); add_to_sclist(MMAIN, "M-.", switch_to_next_buffer_void, 0, TRUE);
#endif #endif
add_to_sclist(MMAIN, "M-V", do_verbatim_input, 0, TRUE); add_to_sclist(MMAIN, "M-V", do_verbatim_input, 0, TRUE);
add_to_sclist(MALL, "^I", do_tab, 0, TRUE);
add_to_sclist(MALL, "^M", do_enter, 0, TRUE);
add_to_sclist(MALL, "kenter", do_enter, 0, TRUE);
add_to_sclist(MALL, "^D", do_delete, 0, TRUE);
add_to_sclist(MALL, "kdel", do_delete, 0, TRUE);
add_to_sclist(MALL, "^H", do_backspace, 0, TRUE);
add_to_sclist(MALL, "kbsp", do_backspace, 0, TRUE);
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_sclist(MALL, "M-T", do_cut_till_end, 0, TRUE); add_to_sclist(MALL, "M-T", do_cut_till_end, 0, TRUE);
add_to_sclist(MALL, "M-J", do_full_justify, 0, TRUE); add_to_sclist(MALL, "M-J", do_full_justify, 0, TRUE);
add_to_sclist(MALL, "M-D", do_wordlinechar_count, 0, TRUE); add_to_sclist(MMAIN, "M-D", do_wordlinechar_count, 0, TRUE);
add_to_sclist(MMAIN, "M-X", do_toggle, NO_HELP, TRUE); add_to_sclist(MMAIN, "M-X", do_toggle, NO_HELP, TRUE);
add_to_sclist(MMAIN, "M-C", do_toggle, CONST_UPDATE, TRUE); add_to_sclist(MMAIN, "M-C", do_toggle, CONST_UPDATE, TRUE);
add_to_sclist(MMAIN, "M-O", do_toggle, MORE_SPACE, TRUE); add_to_sclist(MMAIN, "M-O", do_toggle, MORE_SPACE, TRUE);
@ -1155,6 +1148,8 @@ void shortcut_init(bool unjustify)
add_to_sclist(MMAIN, "M-N", do_toggle, NO_CONVERT, TRUE); add_to_sclist(MMAIN, "M-N", do_toggle, NO_CONVERT, TRUE);
add_to_sclist(MMAIN, "M-Z", do_toggle, SUSPEND, TRUE); add_to_sclist(MMAIN, "M-Z", do_toggle, SUSPEND, TRUE);
#endif #endif
add_to_sclist(MGOTOLINE, "^T", (void *) gototext_msg, 0, FALSE);
add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", (void *) new_buffer_msg, 0, FALSE);
add_to_sclist((MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR), add_to_sclist((MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR),
"^C", (void *) cancel_msg, 0, FALSE); "^C", (void *) cancel_msg, 0, FALSE);
add_to_sclist(MHELP, "^X", do_exit, 0, TRUE); add_to_sclist(MHELP, "^X", do_exit, 0, TRUE);
@ -1169,6 +1164,13 @@ void shortcut_init(bool unjustify)
add_to_sclist(MINSERTFILE, "^X", (void *) ext_cmd_msg, 0, FALSE); add_to_sclist(MINSERTFILE, "^X", (void *) ext_cmd_msg, 0, FALSE);
add_to_sclist(MMAIN, "^Z", do_suspend_void, 0, FALSE); add_to_sclist(MMAIN, "^Z", do_suspend_void, 0, FALSE);
add_to_sclist(MMAIN, "^L", total_refresh, 0, TRUE); add_to_sclist(MMAIN, "^L", total_refresh, 0, TRUE);
add_to_sclist(MALL, "^I", do_tab, 0, TRUE);
add_to_sclist(MALL, "^M", do_enter, 0, TRUE);
add_to_sclist(MALL, "kenter", do_enter, 0, TRUE);
add_to_sclist(MALL, "^D", do_delete, 0, TRUE);
add_to_sclist(MALL, "kdel", do_delete, 0, TRUE);
add_to_sclist(MALL, "^H", do_backspace, 0, TRUE);
add_to_sclist(MALL, "kbsp", do_backspace, 0, TRUE);
#ifdef DEBUG #ifdef DEBUG
print_sclist(); print_sclist();

Просмотреть файл

@ -899,6 +899,7 @@ const sc *get_prompt_string(int *actual, bool allow_tabs,
bool allow_files, bool allow_files,
#endif #endif
const char *curranswer, const char *curranswer,
bool *meta_key, bool *func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
filestruct **history_list, filestruct **history_list,
#endif #endif
@ -909,7 +910,7 @@ const sc *get_prompt_string(int *actual, bool allow_tabs,
) )
{ {
int kbinput = ERR; int kbinput = ERR;
bool meta_key, func_key, have_shortcut, ran_func, finished; bool have_shortcut, ran_func, finished;
size_t curranswer_len; size_t curranswer_len;
const sc *s; const sc *s;
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
@ -971,11 +972,11 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %d\n", answer
* this case, disable all keys that would change the text if the * this case, disable all keys that would change the text if the
* filename isn't blank and we're at the "Write File" prompt. */ * filename isn't blank and we're at the "Write File" prompt. */
while (1) { while (1) {
kbinput = do_statusbar_input(&meta_key, &func_key, &have_shortcut, kbinput = do_statusbar_input(meta_key, func_key, &have_shortcut,
&ran_func, &finished, TRUE, refresh_func); &ran_func, &finished, TRUE, refresh_func);
assert(statusbar_x <= strlen(answer)); assert(statusbar_x <= strlen(answer));
s = get_shortcut(currmenu, &kbinput, &meta_key, &func_key); s = get_shortcut(currmenu, &kbinput, meta_key, func_key);
if (s) if (s)
if (s->scfunc == (void *) cancel_msg || s->scfunc == do_enter) if (s->scfunc == (void *) cancel_msg || s->scfunc == do_enter)
@ -1150,6 +1151,7 @@ int do_prompt(bool allow_tabs,
bool allow_files, bool allow_files,
#endif #endif
int menu, const char *curranswer, int menu, const char *curranswer,
bool *meta_key, bool *func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
filestruct **history_list, filestruct **history_list,
#endif #endif
@ -1181,6 +1183,7 @@ int do_prompt(bool allow_tabs,
allow_files, allow_files,
#endif #endif
curranswer, curranswer,
meta_key, func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
history_list, history_list,
#endif #endif

Просмотреть файл

@ -509,6 +509,7 @@ const sc *get_prompt_string(int *value, bool allow_tabs,
bool allow_files, bool allow_files,
#endif #endif
const char *curranswer, const char *curranswer,
bool *meta_key, bool *func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
filestruct **history_list, filestruct **history_list,
#endif #endif
@ -522,6 +523,7 @@ int do_prompt(bool allow_tabs,
bool allow_files, bool allow_files,
#endif #endif
int menu, const char *curranswer, int menu, const char *curranswer,
bool *meta_key, bool *func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
filestruct **history_list, filestruct **history_list,
#endif #endif
@ -806,7 +808,8 @@ const char *mac_format_msg;
const char *append_msg; const char *append_msg;
const char *prepend_msg; const char *prepend_msg;
const char *backup_file_msg; const char *backup_file_msg;
const char *gototext_msg;
const char *new_buffer_msg;
#ifdef HAVE_REGEX_H #ifdef HAVE_REGEX_H
const char *regexp_msg; const char *regexp_msg;

Просмотреть файл

@ -138,6 +138,7 @@ int search_init(bool replacing, bool use_answer)
char *buf; char *buf;
sc *s; sc *s;
void *func = NULL; void *func = NULL;
bool meta_key = FALSE, func_key = FALSE;
static char *backupstring = NULL; static char *backupstring = NULL;
/* The search string we'll be using. */ /* The search string we'll be using. */
@ -176,6 +177,7 @@ int search_init(bool replacing, bool use_answer)
TRUE, TRUE,
#endif #endif
replacing ? MREPLACE : MWHEREIS, backupstring, replacing ? MREPLACE : MWHEREIS, backupstring,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
&search_history, &search_history,
#endif #endif
@ -883,6 +885,7 @@ void do_replace(void)
{ {
filestruct *edittop_save, *begin; filestruct *edittop_save, *begin;
size_t begin_x, pww_save; size_t begin_x, pww_save;
bool meta_key = FALSE, func_key = FALSE;
ssize_t numreplaced; ssize_t numreplaced;
int i; int i;
@ -925,6 +928,7 @@ void do_replace(void)
TRUE, TRUE,
#endif #endif
MREPLACE2, last_replace, MREPLACE2, last_replace,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
&replace_history, &replace_history,
#endif #endif
@ -984,7 +988,7 @@ void do_replace(void)
void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer, void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
bool interactive, bool save_pos, bool allow_update) bool interactive, bool save_pos, bool allow_update)
{ {
bool meta_key, func_key; bool meta_key = FALSE, func_key = FALSE;
const sc *s; const sc *s;
if (interactive) { if (interactive) {
@ -996,6 +1000,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
TRUE, TRUE,
#endif #endif
MGOTOLINE, use_answer ? ans : "", MGOTOLINE, use_answer ? ans : "",
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
NULL, NULL,
#endif #endif
@ -1012,7 +1017,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
s = get_shortcut(currmenu, &i, &meta_key, &func_key); s = get_shortcut(currmenu, &i, &meta_key, &func_key);
if (s && s->scfunc == do_search) { if (s && s->scfunc == (void *) gototext_msg) {
/* Keep answer up on the statusbar. */ /* Keep answer up on the statusbar. */
search_init(TRUE, TRUE); search_init(TRUE, TRUE);

Просмотреть файл

@ -1770,6 +1770,7 @@ bool do_int_spell_fix(const char *word)
char *save_search, *save_replace; char *save_search, *save_replace;
size_t match_len, current_x_save = openfile->current_x; size_t match_len, current_x_save = openfile->current_x;
size_t pww_save = openfile->placewewant; size_t pww_save = openfile->placewewant;
bool meta_key = FALSE, func_key = FALSE;
filestruct *edittop_save = openfile->edittop; filestruct *edittop_save = openfile->edittop;
filestruct *current_save = openfile->current; filestruct *current_save = openfile->current;
/* Save where we are. */ /* Save where we are. */
@ -1857,6 +1858,7 @@ bool do_int_spell_fix(const char *word)
TRUE, TRUE,
#endif #endif
MSPELL, word, MSPELL, word,
&meta_key, &func_key,
#ifndef NANO_TINY #ifndef NANO_TINY
NULL, NULL,
#endif #endif