mirror of git://git.sv.gnu.org/nano.git
slightly better cut to end behavior, still doesn't preserve cutbuffer w/multi line cuts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@127 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
c9b1dba4a3
commit
45dfda97d8
28
cut.c
28
cut.c
|
@ -133,7 +133,8 @@ int do_cut_text(void)
|
|||
filestruct *tmp, *fileptr = current;
|
||||
#ifndef NANO_SMALL
|
||||
char *tmpstr;
|
||||
int newsize;
|
||||
int newsize, cuttingtoend = 0;
|
||||
|
||||
#endif
|
||||
|
||||
if (fileptr == NULL || fileptr->data == NULL)
|
||||
|
@ -150,9 +151,23 @@ int do_cut_text(void)
|
|||
}
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||
SET(MARK_ISSET);
|
||||
mark_beginbuf = current;
|
||||
mark_beginx = strlen(current->data);
|
||||
if (current_x == strlen(current->data))
|
||||
{
|
||||
|
||||
/* FIXME - We really need to put this data into the
|
||||
cutbuffer, not delete it and forget about it. */
|
||||
do_delete();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SET(MARK_ISSET);
|
||||
SET(KEEP_CUTBUFFER);
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
cuttingtoend = 1;
|
||||
}
|
||||
}
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
if (current->lineno == mark_beginbuf->lineno) {
|
||||
|
@ -190,7 +205,10 @@ int do_cut_text(void)
|
|||
UNSET(MARK_ISSET);
|
||||
marked_cut = 1;
|
||||
set_modified();
|
||||
edit_update(current);
|
||||
if (cuttingtoend)
|
||||
edit_refresh();
|
||||
else
|
||||
edit_update(current);
|
||||
return 1;
|
||||
#else
|
||||
if (0) {
|
||||
|
|
46
po/nano.pot
46
po/nano.pot
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2000-07-24 18:10-0400\n"
|
||||
"POT-Creation-Date: 2000-07-24 23:24-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -19,7 +19,7 @@ msgstr ""
|
|||
msgid "add_to_cutbuffer called with inptr->data = %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: cut.c:148
|
||||
#: cut.c:149
|
||||
msgid "Blew away cutbuffer =)\n"
|
||||
msgstr ""
|
||||
|
||||
|
@ -55,7 +55,7 @@ msgstr ""
|
|||
msgid "File to insert [from ./] "
|
||||
msgstr ""
|
||||
|
||||
#: files.c:272 files.c:296 files.c:486 nano.c:1147
|
||||
#: files.c:272 files.c:296 files.c:486 nano.c:1149
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
|
@ -571,90 +571,90 @@ msgstr ""
|
|||
msgid "Mark UNset"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:873
|
||||
#: nano.c:875
|
||||
#, c-format
|
||||
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:933
|
||||
#: nano.c:935
|
||||
#, c-format
|
||||
msgid "current->data now = \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:986
|
||||
#: nano.c:988
|
||||
#, c-format
|
||||
msgid "After, data = \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1056
|
||||
#: nano.c:1058
|
||||
msgid "Error deleting tempfile, ack!"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1074
|
||||
#: nano.c:1076
|
||||
#, c-format
|
||||
msgid "Could not create a temporary filename: %s"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1097
|
||||
#: nano.c:1099
|
||||
#, c-format
|
||||
msgid "Could not invoke spell program \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#. Why 32512? I dont know!
|
||||
#: nano.c:1103
|
||||
#: nano.c:1105
|
||||
msgid "Could not invoke \"ispell\""
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1116
|
||||
#: nano.c:1118
|
||||
msgid "Finished checking spelling"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1134
|
||||
#: nano.c:1136
|
||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1257
|
||||
#: nano.c:1259
|
||||
msgid "Cannot resize top win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1259
|
||||
#: nano.c:1261
|
||||
msgid "Cannot move top win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1261
|
||||
#: nano.c:1263
|
||||
msgid "Cannot resize edit win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1263
|
||||
#: nano.c:1265
|
||||
msgid "Cannot move edit win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1265
|
||||
#: nano.c:1267
|
||||
msgid "Cannot resize bottom win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1267
|
||||
#: nano.c:1269
|
||||
msgid "Cannot move bottom win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1736
|
||||
#: nano.c:1742
|
||||
msgid "Main: set up windows\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1758
|
||||
#: nano.c:1764
|
||||
msgid "Main: bottom win\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1764
|
||||
#: nano.c:1770
|
||||
msgid "Main: open file\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1837
|
||||
#: nano.c:1843
|
||||
#, c-format
|
||||
msgid "I got Alt-[-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:1853
|
||||
#: nano.c:1859
|
||||
#, c-format
|
||||
msgid "I got Alt-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in New Issue