Add magic line code to do_backspace() and do_delete()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@72 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
29e9a76f36
commit
28a0f89d90
|
@ -20,7 +20,11 @@ CVS code changes since last release -
|
||||||
- Corrected FIXME in do_enter with explanation. (Rob)
|
- Corrected FIXME in do_enter with explanation. (Rob)
|
||||||
- Fixed FIXME in do_justify, resulted in creation of
|
- Fixed FIXME in do_justify, resulted in creation of
|
||||||
fix_editbot [also fixed in do_enter] (winio.c) (Rob)
|
fix_editbot [also fixed in do_enter] (winio.c) (Rob)
|
||||||
|
do_char():
|
||||||
- Magic Line related code in do_char (Rob)
|
- Magic Line related code in do_char (Rob)
|
||||||
|
do_backspace(), do_delete():
|
||||||
|
- Added magic line code here too.
|
||||||
|
|
||||||
- de.po:
|
- de.po:
|
||||||
- Revised translations by floki@bigfoot.com.
|
- Revised translations by floki@bigfoot.com.
|
||||||
- fi.po:
|
- fi.po:
|
||||||
|
|
21
nano.c
21
nano.c
|
@ -444,8 +444,7 @@ void do_char(char ch)
|
||||||
* it means we need a new one! */
|
* it means we need a new one! */
|
||||||
if(filebot == current && current->data[0] == '\0') {
|
if(filebot == current && current->data[0] == '\0') {
|
||||||
new_magicline();
|
new_magicline();
|
||||||
if(current == editbot)
|
fix_editbot();
|
||||||
fix_editbot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* More dangerousness fun =) */
|
/* More dangerousness fun =) */
|
||||||
|
@ -953,13 +952,21 @@ int do_backspace(void)
|
||||||
if (tmp == filebot) {
|
if (tmp == filebot) {
|
||||||
filebot = current;
|
filebot = current;
|
||||||
editbot = current;
|
editbot = current;
|
||||||
|
|
||||||
|
/* Recreate the magic line if we're deleting it AND if the
|
||||||
|
line we're on now is NOT blank. if it is blank we
|
||||||
|
can just use IT for the magic line. This is how Pico
|
||||||
|
appears to do it, in any case */
|
||||||
|
if (strcmp(current->data, "")) {
|
||||||
|
new_magicline();
|
||||||
|
fix_editbot();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current = previous;
|
current = previous;
|
||||||
renumber(current);
|
renumber(current);
|
||||||
previous_line();
|
previous_line();
|
||||||
totlines--;
|
totlines--;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("After, data = \"%s\"\n"), current->data);
|
fprintf(stderr, _("After, data = \"%s\"\n"), current->data);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1000,9 +1007,15 @@ int do_delete(void)
|
||||||
delete_node(foo);
|
delete_node(foo);
|
||||||
update_line(current, current_x);
|
update_line(current, current_x);
|
||||||
|
|
||||||
|
/* Please see the comment in do_basckspace if you don't understand
|
||||||
|
this test */
|
||||||
|
if (current == filebot && strcmp(current->data, ""))
|
||||||
|
{
|
||||||
|
new_magicline();
|
||||||
|
fix_editbot();
|
||||||
|
}
|
||||||
renumber(current);
|
renumber(current);
|
||||||
totlines--;
|
totlines--;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
100
po/nano.pot
100
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-07-03 00:27-0400\n"
|
"POT-Creation-Date: 2000-07-05 18:51-0400\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"
|
||||||
|
@ -27,83 +27,83 @@ msgstr ""
|
||||||
msgid "read_line: not on first line and prev is NULL"
|
msgid "read_line: not on first line and prev is NULL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:180 files.c:193
|
#: files.c:180 files.c:197
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Read %d lines"
|
msgid "Read %d lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:211 search.c:129 search.c:147
|
#: files.c:215 search.c:129 search.c:147
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "\"%s\" not found"
|
msgid "\"%s\" not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. We have a new file
|
#. We have a new file
|
||||||
#: files.c:215
|
#: files.c:219
|
||||||
msgid "New File"
|
msgid "New File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:224
|
#: files.c:228
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "File \"%s\" is a directory"
|
msgid "File \"%s\" is a directory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:229
|
#: files.c:233
|
||||||
msgid "Reading File"
|
msgid "Reading File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:242
|
#: files.c:246
|
||||||
msgid "File to insert [from ./] "
|
msgid "File to insert [from ./] "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:270 files.c:294 files.c:458 nano.c:1105
|
#: files.c:271 files.c:295 files.c:462 nano.c:1130
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:306 files.c:322 files.c:334 files.c:351 files.c:357
|
#: files.c:307 files.c:323 files.c:338 files.c:355 files.c:361
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open file for writing: %s"
|
msgid "Could not open file for writing: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:314
|
#: files.c:315
|
||||||
msgid "Could not open file: Path length exceeded."
|
msgid "Could not open file: Path length exceeded."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:339
|
#: files.c:343
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrote >%s\n"
|
msgid "Wrote >%s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:366
|
#: files.c:370
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not close %s: %s"
|
msgid "Could not close %s: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Try a rename??
|
#. Try a rename??
|
||||||
#: files.c:387 files.c:398 files.c:403
|
#: files.c:391 files.c:402 files.c:407
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open %s for writing: %s"
|
msgid "Could not open %s for writing: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:409
|
#: files.c:413
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not set permissions %o on %s: %s"
|
msgid "Could not set permissions %o on %s: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:416
|
#: files.c:420
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrote %d lines"
|
msgid "Wrote %d lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:437
|
#: files.c:441
|
||||||
msgid "File Name to write"
|
msgid "File Name to write"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:442
|
#: files.c:446
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "filename is %s"
|
msgid "filename is %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:447
|
#: files.c:451
|
||||||
msgid "File exists, OVERWRITE ?"
|
msgid "File exists, OVERWRITE ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ msgid "Case Sens"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:276 global.c:295 global.c:305 global.c:321 global.c:325
|
#: global.c:276 global.c:295 global.c:305 global.c:321 global.c:325
|
||||||
#: global.c:331 winio.c:969
|
#: global.c:331 winio.c:963
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -555,90 +555,90 @@ msgstr ""
|
||||||
msgid "Mark UNset"
|
msgid "Mark UNset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:847
|
#: nano.c:859
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:907
|
#: nano.c:919
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data now = \"%s\"\n"
|
msgid "current->data now = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:951
|
#: nano.c:971
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "After, data = \"%s\"\n"
|
msgid "After, data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1014
|
#: nano.c:1040
|
||||||
msgid "Error deleting tempfile, ack!"
|
msgid "Error deleting tempfile, ack!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1032
|
#: nano.c:1057
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create a temporary filename: %s"
|
msgid "Could not create a temporary filename: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1056
|
#: nano.c:1081
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not invoke spell program \"%s\""
|
msgid "Could not invoke spell program \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Why 32512? I dont know!
|
#. Why 32512? I dont know!
|
||||||
#: nano.c:1062
|
#: nano.c:1087
|
||||||
msgid "Could not invoke \"ispell\""
|
msgid "Could not invoke \"ispell\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1074
|
#: nano.c:1099
|
||||||
msgid "Finished checking spelling"
|
msgid "Finished checking spelling"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1092
|
#: nano.c:1117
|
||||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1215
|
#: nano.c:1240
|
||||||
msgid "Cannot resize top win"
|
msgid "Cannot resize top win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1217
|
#: nano.c:1242
|
||||||
msgid "Cannot move top win"
|
msgid "Cannot move top win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1219
|
#: nano.c:1244
|
||||||
msgid "Cannot resize edit win"
|
msgid "Cannot resize edit win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1221
|
#: nano.c:1246
|
||||||
msgid "Cannot move edit win"
|
msgid "Cannot move edit win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1223
|
#: nano.c:1248
|
||||||
msgid "Cannot resize bottom win"
|
msgid "Cannot resize bottom win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1225
|
#: nano.c:1250
|
||||||
msgid "Cannot move bottom win"
|
msgid "Cannot move bottom win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1689
|
#: nano.c:1704
|
||||||
msgid "Main: set up windows\n"
|
msgid "Main: set up windows\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1711
|
#: nano.c:1726
|
||||||
msgid "Main: bottom win\n"
|
msgid "Main: bottom win\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1717
|
#: nano.c:1732
|
||||||
msgid "Main: open file\n"
|
msgid "Main: open file\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1790
|
#: nano.c:1805
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-%c! (%d)\n"
|
msgid "I got Alt-[-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1806
|
#: nano.c:1821
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-%c! (%d)\n"
|
msgid "I got Alt-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -728,50 +728,50 @@ msgstr ""
|
||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:885
|
#: winio.c:879
|
||||||
#, 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:896
|
#: winio.c:890
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data = \"%s\"\n"
|
msgid "current->data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:939
|
#: winio.c:933
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got \"%s\"\n"
|
msgid "I got \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:964
|
#: winio.c:958
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:966
|
#: winio.c:960
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:968
|
#: winio.c:962
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1104
|
#: winio.c:1098
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1108
|
#: winio.c:1102
|
||||||
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:1232
|
#: winio.c:1226
|
||||||
msgid "Dumping file buffer to stderr...\n"
|
msgid "Dumping file buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1234
|
#: winio.c:1228
|
||||||
msgid "Dumping cutbuffer to stderr...\n"
|
msgid "Dumping cutbuffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1236
|
#: winio.c:1230
|
||||||
msgid "Dumping a buffer to stderr...\n"
|
msgid "Dumping a buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Loading…
Reference in New Issue