Made previous s/r values editable text
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@250 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f754eaadd2
commit
105da33276
13
ChangeLog
13
ChangeLog
|
@ -1,9 +1,13 @@
|
||||||
CVS Code -
|
CVS Code -
|
||||||
- Ran source through indent -kr again. Make everything pretty.
|
- Ran source through indent -kr again. Make everything pretty.
|
||||||
- Added "replace with null" option. ^N in replace. New alias
|
- Changed behavior of "search" and "replace" prompts to make all
|
||||||
NANO_NULL_KEY, and code in do_replace to check for it. Readded
|
previous values editable. This change was made so that you can
|
||||||
NANO_NULL_KEY case to search_init code.
|
replace with the null string without needing a special key for it.
|
||||||
|
changed code in search_init(), do_replace(), nanogetstr (see below).
|
||||||
- global.c
|
- global.c
|
||||||
|
- New global replace_list_2, for 2nd half of the replace dialog
|
||||||
|
("Replace with:"), has fewer options than first half because
|
||||||
|
they were inapropriate.
|
||||||
toggle_init()
|
toggle_init()
|
||||||
- Added #ifdef around toggle_regex_msg to get rid of compiler
|
- Added #ifdef around toggle_regex_msg to get rid of compiler
|
||||||
warning.
|
warning.
|
||||||
|
@ -23,12 +27,15 @@ CVS Code -
|
||||||
- Removed redundant code involving processing replacemenet string.
|
- Removed redundant code involving processing replacemenet string.
|
||||||
Converted if statements to switch statements.
|
Converted if statements to switch statements.
|
||||||
- Optimizations by Rocco Corsi.
|
- Optimizations by Rocco Corsi.
|
||||||
|
- Removed code for deleted shortcuts from in replace_list_2.
|
||||||
do_search()
|
do_search()
|
||||||
- Converted if statements to one switch statement.
|
- Converted if statements to one switch statement.
|
||||||
- winio.c
|
- winio.c
|
||||||
nanogetstr()
|
nanogetstr()
|
||||||
- Added check for 343 in while loop to get rid of getting "locked"
|
- Added check for 343 in while loop to get rid of getting "locked"
|
||||||
into statusbar" bug in odd $TERMs like iris-ansi.
|
into statusbar" bug in odd $TERMs like iris-ansi.
|
||||||
|
- Changed check to return -2 on "enter" from answer == ""
|
||||||
|
to answer == def.
|
||||||
nanoget_repaint()
|
nanoget_repaint()
|
||||||
- New function, removes about 30 lines of duplicate code in
|
- New function, removes about 30 lines of duplicate code in
|
||||||
nanogetstr().
|
nanogetstr().
|
||||||
|
|
16
global.c
16
global.c
|
@ -74,6 +74,7 @@ int mark_beginx; /* X value in the string to start */
|
||||||
shortcut main_list[MAIN_LIST_LEN];
|
shortcut main_list[MAIN_LIST_LEN];
|
||||||
shortcut whereis_list[WHEREIS_LIST_LEN];
|
shortcut whereis_list[WHEREIS_LIST_LEN];
|
||||||
shortcut replace_list[REPLACE_LIST_LEN];
|
shortcut replace_list[REPLACE_LIST_LEN];
|
||||||
|
shortcut replace_list_2[REPLACE_LIST_LEN]; /* 2nd half of replace dialog */
|
||||||
shortcut goto_list[GOTO_LIST_LEN];
|
shortcut goto_list[GOTO_LIST_LEN];
|
||||||
shortcut writefile_list[WRITEFILE_LIST_LEN];
|
shortcut writefile_list[WRITEFILE_LIST_LEN];
|
||||||
shortcut help_list[HELP_LIST_LEN];
|
shortcut help_list[HELP_LIST_LEN];
|
||||||
|
@ -361,10 +362,21 @@ void shortcut_init(void)
|
||||||
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
||||||
do_gotoline_void);
|
do_gotoline_void);
|
||||||
|
|
||||||
sc_init_one(&replace_list[5], NANO_NULL_KEY, _("Null Str"),
|
sc_init_one(&replace_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
||||||
|
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sc_init_one(&replace_list_2[0], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||||
|
nano_firstline_msg, 0, 0, 0, VIEW, do_first_line);
|
||||||
|
|
||||||
|
sc_init_one(&replace_list_2[1], NANO_LASTLINE_KEY, _("Last Line"),
|
||||||
|
nano_lastline_msg, 0, 0, 0, VIEW, do_last_line);
|
||||||
|
|
||||||
|
sc_init_one(&replace_list_2[2], NANO_NULL_KEY, _("Null Str"),
|
||||||
nano_null_msg, 0, 0, 0, VIEW, 0);
|
nano_null_msg, 0, 0, 0, VIEW, 0);
|
||||||
|
|
||||||
sc_init_one(&replace_list[6], NANO_CANCEL_KEY, _("Cancel"),
|
sc_init_one(&replace_list_2[3], NANO_CANCEL_KEY, _("Cancel"),
|
||||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
3
nano.h
3
nano.h
|
@ -240,7 +240,8 @@ know what you're doing */
|
||||||
#define MAIN_LIST_LEN 26
|
#define MAIN_LIST_LEN 26
|
||||||
#define MAIN_VISIBLE 12
|
#define MAIN_VISIBLE 12
|
||||||
#define WHEREIS_LIST_LEN 6
|
#define WHEREIS_LIST_LEN 6
|
||||||
#define REPLACE_LIST_LEN 7
|
#define REPLACE_LIST_LEN 6
|
||||||
|
#define REPLACE_LIST_2_LEN 4
|
||||||
#define GOTO_LIST_LEN 3
|
#define GOTO_LIST_LEN 3
|
||||||
#define WRITEFILE_LIST_LEN 1
|
#define WRITEFILE_LIST_LEN 1
|
||||||
#define HELP_LIST_LEN 3
|
#define HELP_LIST_LEN 3
|
||||||
|
|
|
@ -209,30 +209,28 @@ Usage: nano [option] +LINE <file>\n\
|
||||||
{"Replaced %d occurences", 176},
|
{"Replaced %d occurences", 176},
|
||||||
{"Replaced 1 occurence", 177},
|
{"Replaced 1 occurence", 177},
|
||||||
{"Replace Cancelled", 178},
|
{"Replace Cancelled", 178},
|
||||||
{"Nothing Happens", 179},
|
{"Replace with", 179},
|
||||||
{"Replace with [%s]", 180},
|
{"Replace this instance?", 180},
|
||||||
{"Replace with", 181},
|
{"Enter line number", 181},
|
||||||
{"Replace this instance?", 182},
|
{"Aborted", 182},
|
||||||
{"Enter line number", 183},
|
{"Come on, be reasonable", 183},
|
||||||
{"Aborted", 184},
|
{"Only %d lines available, skipping to last line", 184},
|
||||||
{"Come on, be reasonable", 185},
|
{"actual_x_from_start for xplus=%d returned %d\n", 185},
|
||||||
{"Only %d lines available, skipping to last line", 186},
|
{"input '%c' (%d)\n", 186},
|
||||||
{"actual_x_from_start for xplus=%d returned %d\n", 187},
|
{"New Buffer", 187},
|
||||||
{"input '%c' (%d)\n", 188},
|
{" File: ...", 188},
|
||||||
{"New Buffer", 189},
|
{"Modified", 189},
|
||||||
{" File: ...", 190},
|
{"Moved to (%d, %d) in edit buffer\n", 190},
|
||||||
{"Modified", 191},
|
{"current->data = \"%s\"\n", 191},
|
||||||
{"Moved to (%d, %d) in edit buffer\n", 192},
|
{"I got \"%s\"\n", 192},
|
||||||
{"current->data = \"%s\"\n", 193},
|
{"Yes", 193},
|
||||||
{"I got \"%s\"\n", 194},
|
{"All", 194},
|
||||||
{"Yes", 195},
|
{"No", 195},
|
||||||
{"All", 196},
|
{"do_cursorpos: linepct = %f, bytepct = %f\n", 196},
|
||||||
{"No", 197},
|
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 197},
|
||||||
{"do_cursorpos: linepct = %f, bytepct = %f\n", 198},
|
{"Dumping file buffer to stderr...\n", 198},
|
||||||
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 199},
|
{"Dumping cutbuffer to stderr...\n", 199},
|
||||||
{"Dumping file buffer to stderr...\n", 200},
|
{"Dumping a buffer to stderr...\n", 200},
|
||||||
{"Dumping cutbuffer to stderr...\n", 201},
|
|
||||||
{"Dumping a buffer to stderr...\n", 202},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int _msg_tbl_length = 202;
|
int _msg_tbl_length = 200;
|
||||||
|
|
211
po/nano.pot
211
po/nano.pot
|
@ -6,7 +6,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2000-10-27 01:45-0400\n"
|
"POT-Creation-Date: 2000-10-31 00:04-0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -107,292 +107,292 @@ msgstr ""
|
||||||
msgid "File exists, OVERWRITE ?"
|
msgid "File exists, OVERWRITE ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:123
|
#: global.c:124
|
||||||
msgid "Constant cursor position"
|
msgid "Constant cursor position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:124
|
#: global.c:125
|
||||||
msgid "Auto indent"
|
msgid "Auto indent"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:125
|
#: global.c:126
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:126
|
#: global.c:127
|
||||||
msgid "Help mode"
|
msgid "Help mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:127
|
#: global.c:128
|
||||||
msgid "Pico messages"
|
msgid "Pico messages"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:128
|
#: global.c:129
|
||||||
msgid "Mouse support"
|
msgid "Mouse support"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:129
|
#: global.c:130
|
||||||
msgid "Cut to end"
|
msgid "Cut to end"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:131
|
#: global.c:132
|
||||||
msgid "Regular expressions"
|
msgid "Regular expressions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:133
|
#: global.c:134
|
||||||
msgid "Auto wrap"
|
msgid "Auto wrap"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:175
|
#: global.c:176
|
||||||
msgid "Invoke the help menu"
|
msgid "Invoke the help menu"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:176
|
#: global.c:177
|
||||||
msgid "Write the current file to disk"
|
msgid "Write the current file to disk"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:177
|
#: global.c:178
|
||||||
msgid "Exit from nano"
|
msgid "Exit from nano"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:178
|
#: global.c:179
|
||||||
msgid "Goto a specific line number"
|
msgid "Goto a specific line number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:179
|
#: global.c:180
|
||||||
msgid "Justify the current paragraph"
|
msgid "Justify the current paragraph"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:180
|
#: global.c:181
|
||||||
msgid "Replace text within the editor"
|
msgid "Replace text within the editor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:181
|
#: global.c:182
|
||||||
msgid "Insert another file into the current one"
|
msgid "Insert another file into the current one"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:182
|
#: global.c:183
|
||||||
msgid "Search for text within the editor"
|
msgid "Search for text within the editor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:183
|
#: global.c:184
|
||||||
msgid "Move to the previous screen"
|
msgid "Move to the previous screen"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:184
|
#: global.c:185
|
||||||
msgid "Move to the next screen"
|
msgid "Move to the next screen"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:185
|
#: global.c:186
|
||||||
msgid "Cut the current line and store it in the cutbuffer"
|
msgid "Cut the current line and store it in the cutbuffer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:186
|
#: global.c:187
|
||||||
msgid "Uncut from the cutbuffer into the current line"
|
msgid "Uncut from the cutbuffer into the current line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:187
|
#: global.c:188
|
||||||
msgid "Show the posititon of the cursor"
|
msgid "Show the posititon of the cursor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:188
|
#: global.c:189
|
||||||
msgid "Invoke the spell checker (if available)"
|
msgid "Invoke the spell checker (if available)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:189
|
#: global.c:190
|
||||||
msgid "Move up one line"
|
msgid "Move up one line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:190
|
#: global.c:191
|
||||||
msgid "Move down one line"
|
msgid "Move down one line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:191
|
#: global.c:192
|
||||||
msgid "Move forward one character"
|
msgid "Move forward one character"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:192
|
#: global.c:193
|
||||||
msgid "Move back one character"
|
msgid "Move back one character"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:193
|
#: global.c:194
|
||||||
msgid "Move to the beginning of the current line"
|
msgid "Move to the beginning of the current line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:194
|
#: global.c:195
|
||||||
msgid "Move to the end of the current line"
|
msgid "Move to the end of the current line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:195
|
#: global.c:196
|
||||||
msgid "Go to the first line of the file"
|
msgid "Go to the first line of the file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:196
|
#: global.c:197
|
||||||
msgid "Go to the last line of the file"
|
msgid "Go to the last line of the file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:197
|
#: global.c:198
|
||||||
msgid "Refresh (redraw) the current screen"
|
msgid "Refresh (redraw) the current screen"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:198
|
#: global.c:199
|
||||||
msgid "Mark text at the current cursor location"
|
msgid "Mark text at the current cursor location"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:199
|
#: global.c:200
|
||||||
msgid "Delete the character under the cursor"
|
msgid "Delete the character under the cursor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:201
|
#: global.c:202
|
||||||
msgid "Delete the character to the left of the cursor"
|
msgid "Delete the character to the left of the cursor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:202
|
#: global.c:203
|
||||||
msgid "Insert a tab character"
|
msgid "Insert a tab character"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:203
|
#: global.c:204
|
||||||
msgid "Insert a carriage return at the cursor position"
|
msgid "Insert a carriage return at the cursor position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:205
|
#: global.c:206
|
||||||
msgid "Make the current search or replace case (in)sensitive"
|
msgid "Make the current search or replace case (in)sensitive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:206
|
#: global.c:207
|
||||||
msgid "Cancel the current function"
|
msgid "Cancel the current function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:207
|
#: global.c:208
|
||||||
msgid "Use the null string, \"\""
|
msgid "Use the null string, \"\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:211 global.c:323 global.c:400
|
#: global.c:212 global.c:324 global.c:412
|
||||||
msgid "Get Help"
|
msgid "Get Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:214 global.c:222
|
#: global.c:215 global.c:223
|
||||||
msgid "WriteOut"
|
msgid "WriteOut"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:218 global.c:389
|
#: global.c:219 global.c:401
|
||||||
msgid "Exit"
|
msgid "Exit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:226 global.c:319 global.c:341 global.c:361
|
#: global.c:227 global.c:320 global.c:342 global.c:362
|
||||||
msgid "Goto Line"
|
msgid "Goto Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:231 global.c:310
|
#: global.c:232 global.c:311
|
||||||
msgid "Justify"
|
msgid "Justify"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:235 global.c:306 global.c:337
|
#: global.c:236 global.c:307 global.c:338
|
||||||
msgid "Replace"
|
msgid "Replace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:239
|
#: global.c:240
|
||||||
msgid "Read File"
|
msgid "Read File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:243
|
#: global.c:244
|
||||||
msgid "Where Is"
|
msgid "Where Is"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:247 global.c:381
|
#: global.c:248 global.c:393
|
||||||
msgid "Prev Page"
|
msgid "Prev Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:251 global.c:385
|
#: global.c:252 global.c:397
|
||||||
msgid "Next Page"
|
msgid "Next Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:255
|
#: global.c:256
|
||||||
msgid "Cut Text"
|
msgid "Cut Text"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:258
|
#: global.c:259
|
||||||
msgid "UnCut Txt"
|
msgid "UnCut Txt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:262
|
#: global.c:263
|
||||||
msgid "Cur Pos"
|
msgid "Cur Pos"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:266
|
#: global.c:267
|
||||||
msgid "To Spell"
|
msgid "To Spell"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:270
|
#: global.c:271
|
||||||
msgid "Up"
|
msgid "Up"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:273
|
#: global.c:274
|
||||||
msgid "Down"
|
msgid "Down"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:276
|
#: global.c:277
|
||||||
msgid "Forward"
|
msgid "Forward"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:279
|
#: global.c:280
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:282
|
#: global.c:283
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:285
|
#: global.c:286
|
||||||
msgid "End"
|
msgid "End"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:288
|
#: global.c:289
|
||||||
msgid "Refresh"
|
msgid "Refresh"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:291
|
#: global.c:292
|
||||||
msgid "Mark Text"
|
msgid "Mark Text"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:294
|
#: global.c:295
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:298
|
#: global.c:299
|
||||||
msgid "Backspace"
|
msgid "Backspace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:302
|
#: global.c:303
|
||||||
msgid "Tab"
|
msgid "Tab"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:314
|
#: global.c:315
|
||||||
msgid "Enter"
|
msgid "Enter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:327 global.c:348 global.c:371
|
#: global.c:328 global.c:349 global.c:370 global.c:383
|
||||||
msgid "First Line"
|
msgid "First Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:330 global.c:351 global.c:374
|
#: global.c:331 global.c:352 global.c:373 global.c:386
|
||||||
msgid "Last Line"
|
msgid "Last Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:333 global.c:354
|
#: global.c:334 global.c:355
|
||||||
msgid "Case Sens"
|
msgid "Case Sens"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:344 global.c:367 global.c:377 global.c:393 global.c:397
|
#: global.c:345 global.c:365 global.c:379 global.c:389 global.c:405
|
||||||
#: global.c:403 winio.c:971
|
#: global.c:409 global.c:415 winio.c:974
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:357
|
#: global.c:358
|
||||||
msgid "No Replace"
|
msgid "No Replace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:364
|
#: global.c:376
|
||||||
msgid "Null Str"
|
msgid "Null Str"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -733,31 +733,31 @@ msgstr ""
|
||||||
msgid "I got Alt-%c! (%d)\n"
|
msgid "I got Alt-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:77
|
#: search.c:79
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Case Sensitive Regexp Search%s%s"
|
msgid "Case Sensitive Regexp Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:79
|
#: search.c:81
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Regexp Search%s%s"
|
msgid "Regexp Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:81
|
#: search.c:83
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Case Sensitive Search%s%s"
|
msgid "Case Sensitive Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:83
|
#: search.c:85
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Search%s%s"
|
msgid "Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:86
|
#: search.c:88
|
||||||
msgid " (to replace)"
|
msgid " (to replace)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:94
|
#: search.c:96
|
||||||
msgid "Search Cancelled"
|
msgid "Search Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -774,43 +774,32 @@ msgstr ""
|
||||||
msgid "Replaced 1 occurence"
|
msgid "Replaced 1 occurence"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:396 search.c:429
|
#: search.c:396 search.c:427
|
||||||
msgid "Replace Cancelled"
|
msgid "Replace Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. They used ^N in the search field, shame on them.
|
|
||||||
#. Any Dungeon fans out there?
|
|
||||||
#: search.c:413
|
|
||||||
msgid "Nothing Happens"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: search.c:421
|
#: search.c:421
|
||||||
#, c-format
|
|
||||||
msgid "Replace with [%s]"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: search.c:423
|
|
||||||
msgid "Replace with"
|
msgid "Replace with"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:474
|
#: search.c:461
|
||||||
msgid "Replace this instance?"
|
msgid "Replace this instance?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Ask for it
|
#. Ask for it
|
||||||
#: search.c:535
|
#: search.c:522
|
||||||
msgid "Enter line number"
|
msgid "Enter line number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:537
|
#: search.c:524
|
||||||
msgid "Aborted"
|
msgid "Aborted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:557
|
#: search.c:544
|
||||||
msgid "Come on, be reasonable"
|
msgid "Come on, be reasonable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:562
|
#: search.c:549
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Only %d lines available, skipping to last line"
|
msgid "Only %d lines available, skipping to last line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -825,62 +814,62 @@ msgstr ""
|
||||||
msgid "input '%c' (%d)\n"
|
msgid "input '%c' (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:424
|
#: winio.c:427
|
||||||
msgid "New Buffer"
|
msgid "New Buffer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:427
|
#: winio.c:430
|
||||||
msgid " File: ..."
|
msgid " File: ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:435
|
#: winio.c:438
|
||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:887
|
#: winio.c:890
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Moved to (%d, %d) in edit buffer\n"
|
msgid "Moved to (%d, %d) in edit buffer\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:898
|
#: winio.c:901
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data = \"%s\"\n"
|
msgid "current->data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:941
|
#: winio.c:944
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got \"%s\"\n"
|
msgid "I got \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:966
|
#: winio.c:969
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:968
|
#: winio.c:971
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:970
|
#: winio.c:973
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1107
|
#: winio.c:1110
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1111
|
#: winio.c:1114
|
||||||
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1239
|
#: winio.c:1242
|
||||||
msgid "Dumping file buffer to stderr...\n"
|
msgid "Dumping file buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1241
|
#: winio.c:1244
|
||||||
msgid "Dumping cutbuffer to stderr...\n"
|
msgid "Dumping cutbuffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1243
|
#: winio.c:1246
|
||||||
msgid "Dumping a buffer to stderr...\n"
|
msgid "Dumping a buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
2
proto.h
2
proto.h
|
@ -47,7 +47,7 @@ extern shortcut *shortcut_list;
|
||||||
extern shortcut main_list[MAIN_LIST_LEN], whereis_list[WHEREIS_LIST_LEN];
|
extern shortcut main_list[MAIN_LIST_LEN], whereis_list[WHEREIS_LIST_LEN];
|
||||||
extern shortcut replace_list[REPLACE_LIST_LEN], goto_list[GOTO_LIST_LEN];
|
extern shortcut replace_list[REPLACE_LIST_LEN], goto_list[GOTO_LIST_LEN];
|
||||||
extern shortcut writefile_list[WRITEFILE_LIST_LEN], help_list[HELP_LIST_LEN];
|
extern shortcut writefile_list[WRITEFILE_LIST_LEN], help_list[HELP_LIST_LEN];
|
||||||
extern shortcut spell_list[SPELL_LIST_LEN];
|
extern shortcut spell_list[SPELL_LIST_LEN], replace_list_2[REPLACE_LIST_LEN];
|
||||||
|
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
extern int use_regexp, regexp_compiled;
|
extern int use_regexp, regexp_compiled;
|
||||||
|
|
41
search.c
41
search.c
|
@ -64,14 +64,16 @@ void regexp_cleanup()
|
||||||
int search_init(int replacing)
|
int search_init(int replacing)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char buf[BUFSIZ];
|
/* char buf[BUFSIZ]; */
|
||||||
char *prompt, *reprompt = "";
|
char *prompt, *reprompt = "";
|
||||||
|
|
||||||
|
/*
|
||||||
if (last_search[0]) {
|
if (last_search[0]) {
|
||||||
snprintf(buf, BUFSIZ, " [%s]", last_search);
|
snprintf(buf, BUFSIZ, " [%s]", last_search);
|
||||||
} else {
|
} else {
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (ISSET(USE_REGEXP) && ISSET(CASE_SENSITIVE))
|
if (ISSET(USE_REGEXP) && ISSET(CASE_SENSITIVE))
|
||||||
prompt = _("Case Sensitive Regexp Search%s%s");
|
prompt = _("Case Sensitive Regexp Search%s%s");
|
||||||
|
@ -86,8 +88,8 @@ int search_init(int replacing)
|
||||||
reprompt = _(" (to replace)");
|
reprompt = _(" (to replace)");
|
||||||
|
|
||||||
i = statusq(replacing ? replace_list : whereis_list,
|
i = statusq(replacing ? replace_list : whereis_list,
|
||||||
replacing ? REPLACE_LIST_LEN : WHEREIS_LIST_LEN, "",
|
replacing ? REPLACE_LIST_LEN : WHEREIS_LIST_LEN, last_search,
|
||||||
prompt, reprompt, buf);
|
prompt, reprompt, "");
|
||||||
|
|
||||||
/* Cancel any search, or just return with no previous search */
|
/* Cancel any search, or just return with no previous search */
|
||||||
if ((i == -1) || (i < 0 && !last_search[0])) {
|
if ((i == -1) || (i < 0 && !last_search[0])) {
|
||||||
|
@ -121,9 +123,7 @@ int search_init(int replacing)
|
||||||
} else if (i == NANO_FROMSEARCHTOGOTO_KEY) {
|
} else if (i == NANO_FROMSEARCHTOGOTO_KEY) {
|
||||||
do_gotoline_void();
|
do_gotoline_void();
|
||||||
return -3;
|
return -3;
|
||||||
} else if (i == NANO_NULL_KEY) /* They hit ^N! */
|
} else { /* First line key, etc. */
|
||||||
strncpy(last_search, "", 132);
|
|
||||||
else { /* First line key, etc. */
|
|
||||||
do_early_abort();
|
do_early_abort();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
@ -407,20 +407,18 @@ int do_replace(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(answer, "")) {
|
|
||||||
/* They used ^N in the search field, shame on them.
|
|
||||||
Any Dungeon fans out there? */
|
|
||||||
statusbar(_("Nothing Happens"));
|
|
||||||
replace_abort();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
strncpy(prevanswer, answer, 132);
|
strncpy(prevanswer, answer, 132);
|
||||||
|
|
||||||
if (strcmp(last_replace, "")) /* There's a previous replace str */
|
/*
|
||||||
i = statusq(replace_list, REPLACE_LIST_LEN, "",
|
if (strcmp(last_replace, "")) * There's a previous replace str *
|
||||||
|
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, "",
|
||||||
_("Replace with [%s]"), last_replace);
|
_("Replace with [%s]"), last_replace);
|
||||||
else
|
else
|
||||||
i = statusq(replace_list, REPLACE_LIST_LEN, "", _("Replace with"));
|
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, "", _("Replace with"));
|
||||||
|
*/
|
||||||
|
|
||||||
|
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, last_replace,
|
||||||
|
_("Replace with"));
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case -1: /* Aborted enter */
|
case -1: /* Aborted enter */
|
||||||
|
@ -435,17 +433,6 @@ int do_replace(void)
|
||||||
case NANO_NULL_KEY: /* They want the null string */
|
case NANO_NULL_KEY: /* They want the null string */
|
||||||
strcpy(last_replace, "");
|
strcpy(last_replace, "");
|
||||||
break;
|
break;
|
||||||
case NANO_CASE_KEY: /* They asked for case sensitivity */
|
|
||||||
if (ISSET(CASE_SENSITIVE))
|
|
||||||
UNSET(CASE_SENSITIVE);
|
|
||||||
else
|
|
||||||
SET(CASE_SENSITIVE);
|
|
||||||
|
|
||||||
do_replace();
|
|
||||||
return 0;
|
|
||||||
case NANO_FROMSEARCHTOGOTO_KEY: /* Oops, they want goto line... */
|
|
||||||
do_gotoline_void();
|
|
||||||
return 0;
|
|
||||||
default:
|
default:
|
||||||
if (i != -2) { /* First page, last page, for example
|
if (i != -2) { /* First page, last page, for example
|
||||||
could get here */
|
could get here */
|
||||||
|
|
5
winio.c
5
winio.c
|
@ -395,7 +395,10 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x)
|
||||||
|
|
||||||
strncpy(answer, inputbuf, 132);
|
strncpy(answer, inputbuf, 132);
|
||||||
|
|
||||||
if (!strcmp(answer, ""))
|
/* Now that the text is editable instead of bracketed, we have to
|
||||||
|
check for answer == def, instead of answer == "" */
|
||||||
|
/* if (!strcmp(answer, "")) */
|
||||||
|
if (!strcmp(answer, def))
|
||||||
return -2;
|
return -2;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue