edit_refresh()->edit_update() redundancy

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2000-07-28 02:58:06 +00:00
parent 29d9025381
commit 95b0b5249a
4 changed files with 25 additions and 16 deletions

View File

@ -10,6 +10,10 @@ CVS code
replace_abort() replace_abort()
- redundant, now just calls search abort until it does something - redundant, now just calls search abort until it does something
different. different.
- winio.c:
edit_refresh()
- Added check for current line "running" off the screen.
Hopefully this will not cause any recursive lockups.
nano-0.9.14 - 07/27/2000 nano-0.9.14 - 07/27/2000
- nano.h: - nano.h:

4
cut.c
View File

@ -122,7 +122,7 @@ void cut_marked_segment(filestruct * top, int top_x, filestruct * bot,
filebot = top; filebot = top;
} }
} }
if (top->lineno < edittop->lineno) if (top->lineno < edittop->lineno)
edit_update(top); edit_update(top);
} }
#endif #endif
@ -406,7 +406,7 @@ int do_uncut_text(void)
i = editbot->lineno; i = editbot->lineno;
renumber(newbuf); renumber(newbuf);
if (i < newend->lineno) if (i < newend->lineno)
edit_update(fileptr); edit_update(fileptr);
dump_buffer_reverse(fileptr); dump_buffer_reverse(fileptr);

View File

@ -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-27 21:54-0400\n" "POT-Creation-Date: 2000-07-27 22:58-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"
@ -344,7 +344,7 @@ msgid "Case Sens"
msgstr "" msgstr ""
#: global.c:282 global.c:301 global.c:311 global.c:327 global.c:331 #: global.c:282 global.c:301 global.c:311 global.c:327 global.c:331
#: global.c:337 winio.c:997 #: global.c:337 winio.c:1002
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
@ -758,50 +758,50 @@ msgstr ""
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
#: winio.c:913 #: winio.c:918
#, 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:924 #: winio.c:929
#, c-format #, c-format
msgid "current->data = \"%s\"\n" msgid "current->data = \"%s\"\n"
msgstr "" msgstr ""
#: winio.c:967 #: winio.c:972
#, c-format #, c-format
msgid "I got \"%s\"\n" msgid "I got \"%s\"\n"
msgstr "" msgstr ""
#: winio.c:992 #: winio.c:997
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
#: winio.c:994 #: winio.c:999
msgid "All" msgid "All"
msgstr "" msgstr ""
#: winio.c:996 #: winio.c:1001
msgid "No" msgid "No"
msgstr "" msgstr ""
#: winio.c:1132 #: winio.c:1137
#, c-format #, c-format
msgid "do_cursorpos: linepct = %f, bytepct = %f\n" msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
msgstr "" msgstr ""
#: winio.c:1136 #: winio.c:1141
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:1260 #: winio.c:1265
msgid "Dumping file buffer to stderr...\n" msgid "Dumping file buffer to stderr...\n"
msgstr "" msgstr ""
#: winio.c:1262 #: winio.c:1267
msgid "Dumping cutbuffer to stderr...\n" msgid "Dumping cutbuffer to stderr...\n"
msgstr "" msgstr ""
#: winio.c:1264 #: winio.c:1269
msgid "Dumping a buffer to stderr...\n" msgid "Dumping a buffer to stderr...\n"
msgstr "" msgstr ""

View File

@ -822,7 +822,7 @@ void center_cursor(void)
/* Refresh the screen without changing the position of lines */ /* Refresh the screen without changing the position of lines */
void edit_refresh(void) void edit_refresh(void)
{ {
int lines = 0, i = 0; int lines = 0, i = 0, currentcheck = 0;
filestruct *temp, *hold = current; filestruct *temp, *hold = current;
if (current == NULL) if (current == NULL)
@ -833,9 +833,14 @@ void edit_refresh(void)
while (lines <= editwinrows - 1 && lines <= totlines && temp != NULL) { while (lines <= editwinrows - 1 && lines <= totlines && temp != NULL) {
hold = temp; hold = temp;
update_line(temp, current_x); update_line(temp, current_x);
if (temp == current)
currentcheck = 1;
temp = temp->next; temp = temp->next;
lines++; lines++;
} }
if (!currentcheck) /* Then current has run off the screen... */
edit_update(current);
if (lines <= editwinrows - 1) if (lines <= editwinrows - 1)
while (lines <= editwinrows - 1) { while (lines <= editwinrows - 1) {